#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long v, c, n, m;
    cin >> v >> c >> n >> m;
    int f = 0;
    if (v == 0 && c == 0)
      f = 1;
    else {
      if (m <= min(v, c)) {
        if (v <= c) {
          v -= m;
        } else
          c -= m;
        if (n > (v + c)) {
          f = 1;
        }
      } else
        f = 1;
    }
    if (f)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
  return 0;
}
