You have a coins of value n and b coins of value 1. You always pay in exact change, so you want to know if there exist such x and y that if you take x (0 ≤ x ≤ a) coins of value n and y (0 ≤ y ≤ b) coins of value 1, then the total value of taken coins will be S.

You have to answer q independent test cases.

Input

The first line of the input contains one integer q (1 ≤ q ≤ 10^4) — the number of test cases. Then q test cases follow.

The only line of the test case contains four integers a, b, n and S (1 ≤ a, b, n, S ≤ 10^9) — the number of coins of value n, the number of coins of value 1, the value n and the required total value.

Output

For the i-th test case print the answer on it — YES (without quotes) if there exist such x and y that if you take x coins of value n and y coins of value 1, then the total value of taken coins will be S, and NO otherwise.

You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES will all be recognized as positive answer).

Example

Input


4
1 2 3 4
1 2 3 6
5 2 6 27
3 3 5 18


Output


YES
NO
NO
YES
//  package Jobeel;
import java.util.*;
import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.Map.*;

public class codeforces {
	static 	PrintWriter pw=new PrintWriter(System.out);
	static int [] size,arr;
	
	public static int find(int i) {
		if(arr[i]==i) return i;
		else {
			int result=find(arr[i]);
			arr[i]=result;
			return result;
		}
	}
public static void union(int u,int v) {
		int root_u=find(u);
		int root_v=find(v);
		if (root_u==root_v) return;
		else if(size[root_u]>size[root_v]) {
			size[root_u]+=size[root_v];
			arr[root_v]=root_u;
		}else  {
			size[root_v]+=size[root_u];
			arr[root_u]=root_v;
		}
	}
    static int search(int x,pair [] arr) {
    	int low=0,high=arr.length-1,ans=-1;
    	while(low<=high) {
    		int mid=(low+high)>>1;
    	    if(arr[mid].x>=x) {ans=mid; high=mid-1;}
    	    else low=mid+1;
    	}
    	return ans;
    }
   static  long gcd(long a, long b) 
    { 
        if (b == 0) 
            return a; 
        return gcd(b, a % b);  
          
    } 

       public static void main(String [] args) throws IOException, InterruptedException {
	     InputReader sc=new InputReader(System.in);
	     int t=sc.nextInt(); 
	     while(t-->0) {
	    	 long a=sc.nextLong(),b=sc.nextLong(),n=sc.nextLong(),sum=sc.nextLong();
	    	long c=Math.min(sum/n,a);
	    	pw.println((c*n)+b>=sum ?"YES":"NO" );
	     }
	     pw.flush();
		pw.close();
	}
	static class pair implements Comparable<pair>{
		String  name; int x,y ;
		
		
		public pair (int x,int y) {
			this.x=x; this.y=y;
		}
		public int compareTo(pair o) {
			return o.x-x;
		}
		public String toString() {
			return x+" "+y;
		}
	}

	
	static class InputReader  {
		 
		private InputStream in;
		private byte[] buffer = new byte[1024];
		private int curbuf;
		private int lenbuf;
 
		public InputReader(InputStream in) {
			this.in = in;
			this.curbuf = this.lenbuf = 0;
		}
 
		public boolean hasNextByte() {
			if (curbuf >= lenbuf) {
				curbuf = 0;
				try {
					lenbuf = in.read(buffer);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (lenbuf <= 0)
					return false;
			}
			return true;
		}
 
		private int readByte() {
			if (hasNextByte())
				return buffer[curbuf++];
			else
				return -1;
		}
 
		private boolean isSpaceChar(int c) {
			return !(c >= 33 && c <= 126);
		}
 
		private void skip() {
			while (hasNextByte() && isSpaceChar(buffer[curbuf]))
				curbuf++;
		}
 
		public boolean hasNext() {
			skip();
			return hasNextByte();
		}
 
		public String next() {
			if (!hasNext())
				throw new NoSuchElementException();
			StringBuilder sb = new StringBuilder();
			int b = readByte();
			while (!isSpaceChar(b)) {
				sb.appendCodePoint(b);
				b = readByte();
			}
			return sb.toString();
		}
 
		public int nextInt() {
			if (!hasNext())
				throw new NoSuchElementException();
			int c = readByte();
			while (isSpaceChar(c))
				c = readByte();
			boolean minus = false;
			if (c == '-') {
				minus = true;
				c = readByte();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res = res * 10 + c - '0';
				c = readByte();
			} while (!isSpaceChar(c));
			return (minus) ? -res : res;
		}
 
		public long nextLong() {
			if (!hasNext())
				throw new NoSuchElementException();
			int c = readByte();
			while (isSpaceChar(c))
				c = readByte();
			boolean minus = false;
			if (c == '-') {
				minus = true;
				c = readByte();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res = res * 10 + c - '0';
				c = readByte();
			} while (!isSpaceChar(c));
			return (minus) ? -res : res;
		}
 
		public double nextDouble() {
			return Double.parseDouble(next());
		}
 
		public int[] nextIntArray(int n) {
			int[] a = new int[n];
			for (int i = 0; i < n; i++)
				a[i] = nextInt();
			return a;
		}
 
		public long[] nextLongArray(int n) {
			long[] a = new long[n];
			for (int i = 0; i < n; i++)
				a[i] = nextLong();
			return a;
		}
 
		public char[][] nextCharMap(int n, int m) {
			char[][] map = new char[n][m];
			for (int i = 0; i < n; i++)
				map[i] = next().toCharArray();
			return map;
		}
	}

	}