#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b, n, m;
  cin >> a >> b >> n >> m;
  if (a > b) swap(a, b);
  if (m <= a) {
    a -= m;
  } else {
    cout << "NO" << endl;
    return;
  }
  if (a + b >= n) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
}
signed main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
