#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a) for(int i=0;i<(a);i++)
const ll MOD=1000000007;

const string no="No",yes="Yes";

int main(){
  int T; cin>>T;
  rep(i,T){
    ll A,B,C,D; cin>>A>>B>>C>>D;
    if(A<B) cout<<no<<endl;
    else if(B==D){
      int t=(A-C)/B+((A-C)%B==0?0:1);
      if(A-B*t>=0) cout<<yes<<endl;
      else cout<<no<<endl;
    }else if(B>D) cout<<no<<endl;
    else{
      if(A%2==0&&B%2==1&&C%2==1){
        if(C%2==1){
          if(C>=B-2) cout<<yes<<endl;
          else cout<<no<<endl;
        }else{
          if(C>=B-1) cout<<yes<<endl;
          else cout<<no<<endl;
        }
      }else if(B%2||D%2){
        if(C>=B-1) cout<<yes<<endl;
        else cout<<no<<endl;
      }else{
        if(B%2==C%2){
          if(C>=B-2) cout<<yes<<endl;
          else cout<<no<<endl;
        }else{
          if(C>=B-1) cout<<yes<<endl;
          else cout<<no<<endl;
        }
      }
    }
  }
  return 0;
}
