#include <bits/stdc++.h>
using namespace std;
long long arr[500007], brr[500007], crr[500007];
long long ar[1000][1000], br[1000][1000], cr[1000][1000];
char att[1000], m1, m2;
long long d1, d2, d3, d4, d5, d6, d7;
string g, h, v;
vector<long long> v2;
int main() {
  long long a, b, c, d, e, f, i, j, k, l, m, n, r, t, w, x, y, z, s, ans, sum;
  cin >> t;
  while (t--) {
    d = 0, e = 0, f = 0, l = 0, n = 0, ans = 0, sum = 0;
    cin >> a >> b >> n >> s;
    k = (s / n);
    l = s - (k * n);
    f = s - b;
    r = f / n;
    ans = (a * n) + b;
    if (ans < s) {
      cout << "NO" << endl;
      continue;
    }
    if (r <= a && (r * n) == f) {
      cout << "YES" << endl;
      continue;
    }
    if (l <= b)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
