#include <bits/stdc++.h>
using namespace std;
int main() {
  int T, a, b, c, d;
  cin >> T;
  for (int i = 0; i < T; i++) {
    cin >> a >> b >> c >> d;
    if (a < b || b < d || a % b > c) {
      cout << "No" << endl;
      continue;
    } else if (b <= c) {
      cout << "Yes" << endl;
    } else {
      for (int j = 0; j < d; j++) {
        if ((d * j + a % b - j * b) % d > c) {
          cout << "No" << endl;
          break;
          continue;
        }
      }
      cout << "Yes" << endl;
    }
  }
  return 0;
}
