#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  long a, b, c, d;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> a >> b >> c >> d;
    if (a < b) {
      cout << "No" << endl;
    } else if (b > d) {
      cout << "No" << endl;
    } else {
      long x = a - b;
      if (d % b != 0L) {
        while (x <= c) {
          x += d % b;
        }
      } else {
        x = a % b;
      }
      if (x > c && b > x) {
        cout << "No" << endl;
      } else {
        cout << "Yes" << endl;
      }
    }
  }
}
