#include <bits/stdc++.h>
using namespace std;
template <typename T>
using V = vector<T>;
template <typename T>
using VV = vector<V<T>>;
template <typename T>
istream& operator>>(istream& cin, V<T>& arr) {
  for (T& val : arr) {
    cin >> val;
  }
  return cin;
}
template <typename T>
ostream& operator<<(ostream& cout, V<T>& arr) {
  for (T& val : arr) {
    cout << val << " ";
  }
  return cout;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, m;
    cin >> a >> b >> n >> m;
    long long tmp = min(n, max(a, b) - min(a, b));
    if (b > a) swap(a, b);
    a -= tmp;
    n -= tmp;
    if (m > b || n + m > a + b)
      cout << "No\n";
    else
      cout << "Yes\n";
  }
  return 0;
}
