import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.StringTokenizer; public class Main { public static void main(String[] args) { FastReader reader = new FastReader(); int T = reader.nextInt(); while (T>0){ int n = reader.nextInt(); int max = reader.nextInt(); int min = reader.nextInt(); int ave = reader.nextInt(); System.out.println(getResult(n,max,min,ave)); T--; } } public static String getResult(int n, int max, int min, int ave) { int sum = n*ave; if(max>=ave&&ave>=min&&max<=sum-(n-1)*min&&min>=sum-(n-1)*max){ return "yes"; } return "no"; } } class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader( new InputStreamReader(System.in)); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } int[] arrayIn(int n) { int arr[] = new int[n]; for (int i = 0; i < n; i++) { arr[i] = nextInt(); } return arr; } }