#include <bits/stdc++.h>
using namespace std;
const int mx = 123456;
long long n, s[mx], ans[mx];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a < b) {
      ans[i] = 0;
      continue;
    }
    if (d < b) {
      ans[i] = 0;
      continue;
    }
    if (c < b - 1) {
      if (a % b > c) {
        ans[i] = 0;
        continue;
      }
      if (d % b == 0) {
        ans[i] = 1;
        continue;
      }
      long long temp = a % b;
      long long temp2 = d % b;
      long long bb = b - temp;
      long long cc = c - temp;
      if (b - c - 1 >= temp2) {
        ans[i] = 0;
        continue;
      }
      if ((cc + 1) % temp2 == 0) {
        continue;
      }
      if (temp2 - ((cc + 1) % temp2) + 1 <= bb - 1 - cc) {
        ans[i] = 0;
        continue;
      }
    }
    ans[i] = 1;
  }
  for (int i = 0; i < n; i++) {
    if (ans[i] == 0) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
    }
  }
  return 0;
}
