#include <bits/stdc++.h>
using namespace std;
void input() {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  input();
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, n, m, ans = 0;
    cin >> a >> b >> n >> m;
    if (a == b && b == n && n == m) {
      cout << "YES\n";
    } else if ((a + b) < (n + m) || min(a, b) < m) {
      cout << "NO\n";
    } else {
      cout << "YES\n";
    }
  }
}
