#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, x[4][300] = {};
  cin >> t;
  for (int i = 0; i < t; i++) {
    for (int j = 0; j < 4; j++) {
      cin >> x[i][j];
    }
  }
  for (int i = 0; i < t; i++) {
    for (int k = 0;; k++) {
      if (x[i][0] - x[i][1] <= x[i][2]) x[i][0] += x[i][3];
      if (x[i][0] < x[i][1]) {
        cout << "No" << endl;
        break;
      }
      if (x[i][0] < x[i][2] && x[i][0] + x[i][3] > x[i][1]) {
        cout << "Yes" << endl;
        break;
      }
    }
  }
  return 0;
}
