#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lli = long long int;
using ld = long double;
const int N = 2e5 + 5, inf = 2e9;
ll process(ll n) { return (n * (n + 1)) / 2; }
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    ld v, c, n, m;
    cin >> v >> c >> n >> m;
    if (m <= min(v, c) && v + c >= n + m)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
