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