#include <bits/stdc++.h>
using namespace std;
const int maxn = 200007;
const long long int inf = 0x3f3f3f3f;
const int mod = 998244353;
int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ;
  long long int t, n, m, x, y, z, ans = 0, cnt = 0, temp = 0, f = 0;
  vector<int> v1, v2, v3;
  string s1, s2, s3;
  long long int a[100000], b[100000];
  t = read();
  while (t--) {
    x = read();
    y = read();
    n = read();
    long long int price = read();
    temp = min(x, price / n);
    price -= (temp * n);
    if (price <= y)
      cout << "YES" << '\n';
    else
      cout << "NO"
           << "\n";
  }
  return 0;
}
