#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    long long v, c, n, m;
    cin >> v >> c >> n >> m;
    if (v + c < n + m) {
      cout << "NO\n";
      continue;
    } else if (v <= c && v < m) {
      cout << "NO\n";
      continue;
    } else if (v > c && c < m) {
      cout << "NO\n";
      continue;
    }
    cout << "YES\n";
  }
  return 0;
}
