#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  long n;
  cin >> n;
  long long a, b, c, d;
  for (int i = 0; i < n; ++i) {
    cin >> a >> b >> c >> d;
    if (a < b || b > d) {
      cout << "No"
           << "\n";
    } else if (a % b == 0 || b - 1 <= c) {
      cout << "Yes"
           << "\n";
    } else {
      for (long long x = c + 1; x < b; x++) {
        if ((a % b) == x) {
          cout << "No"
               << "\n";
          break;
        } else if (d % b == 0) {
          cout << "Yes"
               << "\n";
          break;
        }
        if ((x - (a % b)) % (d % b)) {
          if (x == b - 1)
            cout << "Yes"
                 << "\n";
          continue;
        } else {
          cout << "No"
               << "\n";
          break;
        }
      }
    }
  }
  return 0;
}
