#include <bits/stdc++.h>
using namespace std;
long long m(long long a) {
  return ((a % 1000000007) + 1000000007) % 1000000007;
}
long long p(long long a, long long b) {
  if (b == 0) return (long long)1;
  long long x = p(a, b >> 1);
  if (b & 1) return m(x * m(a * x));
  return m(x * x);
}
signed main() {
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, s;
    cin >> a >> b >> n >> s;
    long long close = floor(1.0 * s / n);
    a = min(a, close);
    s -= a * n;
    if (b >= s)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
