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

import java.io.*;

import java.util.*;


public class Solve{
    static final int MOD=1000000007;
   
    public static void main (String[] args) throws Exception{
         BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
          PrintWriter out=new  PrintWriter(System.out,true);
        
       
          int t=Integer.parseInt(in.readLine());

        while(t-->0)
          solve(in,out);
       
    }

    private static void solve(BufferedReader in,PrintWriter out)throws Exception {
        
        String[] abns=in.readLine().trim().split(" ");
        int a=Integer.parseInt(abns[0]);
        int b=Integer.parseInt(abns[1]);
        int n=Integer.parseInt(abns[2]);
        int s=Integer.parseInt(abns[3]);

        if(s%n<=b && 1l*a*n+b>=s)
        out.println("YES");
        else out.println("NO");
     
      }

      private static long power(long n,long p,long m){
        
        long result=1;

        while(p>0){
            if(p%2==1) result=(result*n)%m;
            n=(n*n)%m;
            p>>=1;
        }
        return result;
    }

   private int gcd(int a, int b) {
        if(b==0)
            return a;
        else
            return gcd(b, a % b);
    }


    private static void sieve(int n){
         boolean[] prime=new boolean[n];
         for(int i=0;i<n;i++)
             prime[i]=true;
         for(int i=2;i*i<n;i++){
            if(prime[i]){
                for(int j=i*i;j<n;j+=i)
                 prime[j]=false;
            }
        }
         for ( int i = 2; i < prime.length; i++) {
             if(prime[i])
              System.out.print(i+" ");
         }  
         
    
    }

    private static void segmentedSieve(int low,int high){

        int sqrt=(int) Math.sqrt(high);
        int[] prime=new int[sqrt+1];
        boolean[] arr=new boolean[sqrt+1];

        for(int i=0;i<=sqrt;i++)
            arr[i]=true;

        int k=0;
        for(int i=2;i<=sqrt;i++){           //generate all prime numbers till square root of high
            if(arr[i]){
                prime[k]=i;
                
                k++;
                for (int j = i*i; j <= sqrt; j+=i) 
                    arr[j]=false;
        
                
             }
        }
        // System.out.println(Arrays.toString(prime));

        int diff=high-low+1;          // arr size of required length 
        arr=new boolean[diff];
        for(int i=0;i<diff;i++)
             arr[i]=true;
        
        for(int i=0;i<k;i++){               // mark false to multiple of prime numbers in the range of low to high
            int div=(low/prime[i])*prime[i];        // It gives multiple of prime[i] nearest to low 
            if(div<low || div==prime[i])
               div+=prime[i];
            for(int j=div;j<=high;j+=prime[i]){
                 if(j!=prime[i])
               arr[j-low]=false;
            }
        }
        for(int i=0;i<diff;i++){                //print prime numbers in the given segment
            if(arr[i] && (i+low)!=1){
                System.out.print(i+low+" ");
            }
        }
        System.out.println();

    }

    class Pair implements Comparable<Pair>{
        int a;
        int b;
        public Pair(int a,int b){
            this.a=a;
            this.b=b;
        }
    
        @Override
        public int compareTo(Pair o) {
          if(this.a>o.a) return this.a-o.a;
          else if(this.a<o.a)
              return this.b-o.b;
          
          else  return 0;
         
        }
    }
}
