#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = (int)1e9;
ll a[301], b[301], c[301], d[301];
bool solve(ll A, ll B, ll C, ll D) {
  if (A < B)
    return false;
  else if (B > D)
    return false;
  else if (B <= C)
    return true;
  else {
    if (A % B > C)
      return false;
    else {
      ll step = D % B;
      if (step == 0)
        return true;
      else if (step < B - C)
        return false;
      else {
        if (C + 1 > B - 1)
          return true;
        else if (B % step <= (A % B) % step and (A % B) % step <= C % step)
          return true;
        else
          return false;
      }
    }
  }
}
int main(void) {
  int T;
  cin >> T;
  for (int i = 0; i < T; i++) {
    cin >> a[i] >> b[i] >> c[i] >> d[i];
  }
  for (int i = 0; i < T; i++) {
    cout << (solve(a[i], b[i], c[i], d[i]) ? "Yes" : "No") << '\n';
  }
  return 0;
}
