#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, c, d;
    scanf("%lld %lld %lld %lld", &a, &b, &c, &d);
    if (a < b) {
      cout << "No" << endl;
      continue;
    }
    long long x = (a % b + d % b) % b, y, z = 0;
    if (d >= b) {
      y = d % b;
      while (x + z <= c) {
        if (y == 0) break;
        z += y;
      }
    } else {
      cout << "No" << endl;
      continue;
    }
    if (x + z < b && c < x + z) {
      cout << "No" << endl;
      continue;
    } else {
      cout << "Yes" << endl;
      continue;
    }
  }
  return 0;
}
