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