#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  long long a, b, c, d;
  for (int i = (0); i < (t); ++i) {
    cin >> a >> b >> c >> d;
    if (a < b || b > d || a % b > c) {
      cout << "No" << endl;
      continue;
    }
    if (d - b == 0) {
      cout << "Yes" << endl;
      continue;
    }
    if (((c - a % b) / (d - b) + 1) * (d - b) < b) {
      cout << "No" << endl;
      continue;
    }
    cout << "Yes" << endl;
  }
  return 0;
}
