#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
const long long MAXN = 1e6 + 1;
using namespace std;
long long readInt() {
  bool minus1 = false;
  long long result = 0;
  char ch;
  ch = getchar();
  while (true) {
    if (ch == '-') break;
    if (ch >= '0' && ch <= '9') break;
    ch = getchar();
  }
  if (ch == '-')
    minus1 = true;
  else
    result = ch - '0';
  while (true) {
    ch = getchar();
    if (ch < '0' || ch > '9') break;
    result = result * 10 + (ch - '0');
  }
  if (minus1)
    return -result;
  else
    return result;
}
int main() {
  int t = readInt();
  while (t--) {
    long long a = readInt(), b = readInt(), c = readInt(), d = readInt();
    if (b > a) {
      cout << "No\n";
    } else if (b > d) {
      cout << "No\n";
    } else {
      cout << "Yes\n";
    }
  }
  return 0;
}
