#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  long long a, b, c, d;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    if ((a - b) <= c && ((a - b) + d - b) <= c) {
      cout << "No" << endl;
    } else
      cout << "Yes" << endl;
  }
  return 0;
}
