#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  int i, T;
  cin >> T;
  long long a, b, c, d;
  for (i = 0; i < T; i++) {
    cin >> a >> b >> c >> d;
    long long k = a % b;
    if (k == 0) k = b;
    if (a < b || d < b || k > c) {
      cout << "No" << endl;
      continue;
    }
    cout << "Yes" << endl;
  }
}
