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