#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 6;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, m;
    cin >> a >> b >> n >> m;
    if (a <= b)
      a -= m;
    else
      b -= m;
    if (a < 0 || b < 0) {
      cout << "No\n";
      continue;
    }
    if (a + b >= n)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
