#include <bits/stdc++.h>
using namespace std;
long long int pwr(long long int base, long long int p) {
  long long int ans = 1;
  while (p) {
    if (p & 1) ans = ((ans % 1000000007) * (base % 1000000007)) % 1000000007;
    base = ((base % 1000000007) * (base % 1000000007)) % 1000000007;
    p /= 2;
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int powr(long long int base, long long int p) {
  long long int ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base);
    base = (base * base);
    p /= 2;
  }
  return ans;
}
long long int dx[] = {1, -1, 0, 0, 1, 1, -1, -1};
long long int dy[] = {0, 0, 1, -1, 1, -1, 1, -1};
int32_t main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, n, s;
    cin >> a >> b >> n >> s;
    long long int x = min(a, s / n);
    long long int y = (s - (n * x));
    if ((x >= 0 && x <= a) && (y >= 0 && y <= b)) {
      cout << "YES" << endl;
    } else
      cout << "NO" << endl;
  }
}
