#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
long long REM(long long a) {
  a %= MOD;
  if (a < 0) a += MOD;
  return a;
}
long long ADD(long long a, long long b) { return REM(REM(a) + REM(b)); }
long long SUB(long long a, long long b) { return REM(REM(a) - REM(b)); }
long long MUL(long long a, long long b) { return REM(REM(a) * REM(b)); }
long long POT(long long n, long long k) {
  if (k == 0) return 1;
  long long ret = POT(n, k / 2);
  ret = MUL(ret, ret);
  if (k % 2) return MUL(ret, n);
  return ret;
}
long long DIV(long long a, long long b) { return MUL(a, POT(b, MOD - 2)); }
bool isPrime(long long x) {
  for (long long i = 2; i <= sqrt(x); i++)
    if (x % i) return false;
  return true;
}
long long q, a, b, n, S;
void solve() {
  cin >> a >> b >> n >> S;
  if (a * n + b < S) {
    cout << "NO\n";
    return;
  }
  long long ost = S % n, k = S / n;
  if (k > a) {
    long long raz = k - a;
    ost += raz * n;
  }
  if (b >= ost) {
    cout << "YES\n";
    return;
  }
  cout << "NO\n";
}
int main() {
  cin >> q;
  while (q--) solve();
  return 0;
}
