#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
signed main() {
  int T;
  cin >> T;
  for (int q = 0; q < T; q++) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (c >= b - 1 || b == 1) {
      cout << "Yws" << endl;
      continue;
    } else if (a < b) {
      cout << "No" << endl;
      continue;
    }
    if (b == d) {
      int e = (a - b) % b;
      if (e > c && e < b) {
        cout << "No" << endl;
      } else {
        cout << "Yes" << endl;
      }
      continue;
    }
    cout << "Yes" << endl;
  }
}
