#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base ::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    long long a, b, c, d;
    cin >> a >> b >> c >> d;
    if (a < b || b > d) {
      cout << "No\n";
      continue;
    }
    if (d == b) {
      cout << "Yes\n";
      continue;
    }
    long long inc = d - b;
    long long l = c / inc;
    long long r = (b - 1) / inc;
    if (l == r)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
