#include <stdio.h>

int main(void)
{
  int T;
  int num,i,j;
  int ago[1000];
  int A[300],B[300],C[300],C[300];

  j = 0;
  
  for(i = 0;i < T;i++) {
    scanf("%d %d %d %d", &A[i], &B[i], &C[i], &D[i]);
    
    num = A[i];
    
    while (1) {
      num = num - B[i];
      if(num < 0) {
        printf("No\n");
        break;
      }
      
      ago[j] = num;
      
      if(num <= C[i]) {
        num += D[i];
      }
      
      for(n = 0;n <= j;n++) {
        if(num == ago[n]) {
          printf("Yes\n");
          break;
        }
      }

      j++;
    }
    
  }
  
  return 0;
}
