#include <bits/stdc++.h>
using namespace std;
template <typename T>
void vprint(T &V) {
  for (auto v : V) {
    cout << v << " ";
  }
  cout << endl;
}
const long long mod = 1e9 + 7;
const long long inf = 1e18;
bool can_eternal(long long A, long long B, long long C, long long D) {
  if (A < B) {
    ;
    return false;
  }
  if (B > D) {
    ;
    return false;
  }
  long long start = A % B;
  long long step = D - B;
  if (start > C) {
    return false;
  }
  if (step == 0) {
    if (start <= C) {
      return true;
    } else {
      return false;
    }
  }
  if (B - C <= 1) {
    ;
    return true;
  }
  if (step == 1) {
    return false;
  }
  long long left = C + 1;
  long long right = B;
  if (right - left >= step) {
    return false;
  }
  while (start < right) {
    start += step;
    if (left <= start && start < right) {
      return false;
    }
  }
  return true;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  long long T;
  cin >> T;
  for (long long i = (0); i < (T); ++i) {
    long long A, B, C, D;
    cin >> A >> B >> C >> D;
    ;
    bool can = can_eternal(A, B, C, D);
    if (can) {
      cout << ("Yes") << endl;
    } else {
      cout << ("No") << endl;
    }
  }
  return 0;
}
