#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int main() {
  int T;
  cin >> T;
  while (T--) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    int flg = 1;
    if (a < b)
      flg = 0;
    else {
      if (d < b)
        flg = 0;
      else {
        if (c < b) {
          a = a % b;
          d = d % b;
          long long l = c - a, r = b - a;
          if (l < 0)
            flg = 0;
          else if (d == 0 || r - l <= 1)
            flg = 1;
          else
            flg = 0;
        }
      }
    }
    cout << (flg ? "Yes" : "No") << endl;
  }
  return 0;
}
