#include <bits/stdc++.h>
using namespace std;
char kotae(int a, int b, int c, int d) {
  char ans;
  if (a < b || c + 1 < b || d < b) {
    ans = 'No';
  } else {
    ans = 'Yes';
  }
  return ans;
}
int main() {
  int a, b, c, d, t;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> a >> b >> c >> d;
    cout << kotae(a, b, c, d) << endl;
  }
  return 0;
}
