#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, a, b, n, m;
  cin >> t;
  while (t--) {
    cin >> a >> b >> n >> m;
    if (a > b) {
      b = b - m;
      if (b < 0)
        cout << "NO"
             << "\n";
      else {
        if (a + b < n)
          cout << "NO"
               << "\n";
        else
          cout << "YES"
               << "\n";
      }
    } else {
      a = a - m;
      if (a < 0)
        cout << "NO"
             << "\n";
      else {
        if (a + b < n)
          cout << "NO"
               << "\n";
        else
          cout << "YES"
               << "\n";
      }
    }
  }
}
