#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int mod = 1000000007;
int mondaiC() {
  int N;
  string S;
  cin >> N;
  cin >> S;
  int j = 0;
  char isshodenaito[2][20];
  int mae = 0;
  int k = 0;
  int kara[2];
  isshodenaito[0][0] = S[0];
  for (int i = 0; i < 2 * N; i++) {
    if (mae == 0) {
      while (isshodenaito[0][kara[0]]) {
      }
    }
  }
  return 0;
}
int mondaiB() {
  int T;
  cin >> T;
  long long A[310];
  long long B[310];
  long long C[310];
  long long D[310];
  for (int i = 0; i < T; i++) {
    cin >> A[i] >> B[i] >> C[i] >> D[i];
  }
  for (int i = 0; i < T; i++) {
    if (A[i] < B[i])
      printf("No\n");
    else if (A[i] % B[i] > C[i])
      printf("No\n");
    else if (B[i] > D[i])
      printf("No\n");
    else if (D[i] % B[i] == 0)
      printf("Yes\n");
    else if (B[i] <= C[i])
      printf("Yes\n");
    else if (D[i] % B[i] < B[i] - C[i])
      printf("No\n");
    else if (D[i] % B[i] > B[i] - C[i]) {
      if ((A[i] % B[i]) % (D[i] % B[i]) > (D[i] % B[i]) - (B[i] - C[i]))
        printf("No\n");
      else
        printf("Yes\n");
    } else if ((A[i] % B[i]) % (D[i] % B[i]) == C[i] % (D[i] % B[i]))
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
int mondaiA() {
  int N;
  cin >> N;
  int a[110];
  int chigau = 0;
  int kaeru = 0;
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    if (i > 0 && a[i] == a[i - 1]) {
      chigau++;
    } else {
      kaeru += (chigau + 1) / 2;
      chigau = 0;
    }
  }
  kaeru += (chigau + 1) / 2;
  printf("%d\n", kaeru);
  return 0;
}
int main() { mondaiB(); }
