#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long b, long long m) {
  long long res = 1;
  a = a % m;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long mod(long long a, long long b) {
  if (a % b < 0) {
    return a % b + b;
  }
  return a % b;
}
long long gcdExtended(long long a, long long b, long long *x, long long *y) {
  if (a == 0) {
    *x = 0, *y = 1;
    return b;
  }
  long long x1, y1;
  long long gcd = gcdExtended(b % a, a, &x1, &y1);
  *x = y1 - (b / a) * x1;
  *y = x1;
  return gcd;
}
bool isPowerOfTwo(long long n) {
  if (n == 0) return 0;
  while (n != 1) {
    if (n % 2 != 0) return 0;
    n = n / 2;
  }
  return 1;
}
int main() {
  long long t = 1;
  cin >> t;
  while (t--) {
    long long a, b, n, m;
    long long ans = -1;
    cin >> a >> b >> n >> m;
    if ((a + b) < (n + m))
      ans = -1;
    else {
      if (((a > b) ? b : a) >= m) ans = 1;
    }
    if (ans == -1)
      cout << "NO" << endl;
    else if (ans == 1)
      cout << "YES" << endl;
  }
  return 0;
}
