#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  unsigned long long A, B, C, D;
  for (int i = 0; i < T; i++) {
    cin >> A >> B >> C >> D;
    if (A < B) {
      cout << "No" << endl;
    } else if (B > D) {
      cout << "No" << endl;
    } else if (C + 1 < B) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
    }
  }
  return 0;
}
