#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(10);
  cout << fixed;
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, n, m;
    cin >> a >> b >> n >> m;
    if (a + b < n + m) {
      cout << "NO" << endl;
      continue;
    }
    if (a > b) {
      long long int val = n - (a - b);
      val += a + b - n - m;
      if (val < m) {
        cout << "NO" << endl;
        continue;
      }
    } else {
      long long int val = n - (b - a);
      val = val + (a + b - n - m);
      if (val < m) {
        cout << "NO" << endl;
        continue;
      }
    }
    cout << "YES" << endl;
  }
  return 0;
}
