#include <bits/stdc++.h>
int hyouji(int A, int B, int C, int D) {
  int i, j, k, l;
  if (A < B) {
    printf("No\n");
  } else {
    for (i = 0; i < B; i = i + 1) {
      j = i * B;
      k = A + j;
      l = k % B;
      if (C < l) {
        printf("No\n");
        goto End;
      }
    }
    printf("Yes\n");
  }
End:
  return 0;
}
int main(void) {
  int NUM[3];
  int n, m, i;
  scanf("%d", &n);
  for (m = 0; m < n; m = m + 1) {
    for (i = 0; i < 4; i = i + 1) {
      scanf("%d", &NUM[i]);
    }
    hyouji(NUM[0], NUM[1], NUM[2], NUM[3]);
  }
  return 0;
}
