#include <bits/stdc++.h>
using ll = long long;
const ll mod = 1000000007;
bool ok;
long long A, B, C, D;
using namespace std;
void dfs(int a, int b) {
  if ((A - B * a + D * b == 0 && B > D) || A - B * a + D * b < 0) ok = false;
  if (!ok) return;
  if (a + b > 10000) return;
  if (A - B * a + b * D <= C) {
    dfs(a + 1, b + 1);
  } else if (A - B * a + b * D > C) {
    dfs(a + 1, b);
  }
  return;
}
int main() {
  int T;
  cin >> T;
  for (int i = 0; i < T; ++i) {
    cin >> A >> B >> C >> D;
    ok = true;
    if (A - B < 0 || A % B > C) {
      ok = false;
    } else {
      dfs(1, 0);
    }
    if (!ok)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
  return 0;
}
