#include <bits/stdc++.h>
using namespace std;
const int INF = 1 << 29;
const int mod = 1000000007;
int mondaiB() {
  int T;
  cin >> T;
  long long A, B, C, D;
  for (int i = 0; i < T; i++) {
    cin >> A >> B >> C >> D;
    if (A < B)
      printf("No\n");
    else if (A % B > C)
      printf("No\n");
    else if (B > D)
      printf("No\n");
    else if (D % B == 0) {
      if (A % B <= C)
        printf("Yes\n");
      else
        printf("No\n");
    } else {
      if (D % B < B - C)
        printf("No\n");
      else if (D % B > B - C)
        printf("Yes\n");
      else {
        if (A % (D % B) == 0)
          printf("Yes\n");
        else
          printf("No\n");
      }
    }
  }
  return 0;
}
int main() { mondaiB(); }
