#include <iostream>
using namespace std;
int main(){
  int T,a,b,c,d;
  cin>>T;
  for(int i=0;i<N;i++){
   cin>>a>>b>>c>>d;
   if(a<b||b<d||a%b>c){
     cout<<'No'<<endl;
     continue;
   }else{for(int j=0;j<d;j++){
      if((a%b-j*b)%d>c){
     cout<<'No'<<endl;
     break;
    continue;
   }

 }
 cout<<'Yes'<<endl;
    }
  return 0;
}
