#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  unsigned long long int t;
  cin >> t;
  while (t--) {
    unsigned long long int a, b, n, m;
    cin >> a >> b >> n >> m;
    if (a > b) {
      swap(a, b);
    }
    if (a < m) {
      cout << "NO\n";
      continue;
    }
    a = a - m;
    a = a + b;
    if (a < n) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
  }
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  return 0;
}
