#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, m;
    cin >> a >> b >> n >> m;
    long long check = 0;
    if (a + b < n + m) check = 1;
    if (a > b) {
      if (m > b) check = 1;
    } else {
      if (m > a) check = 1;
    }
    if (check)
      cout << "NO" << endl;
    else
      cout << "YES" << endl;
  }
}
