#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long a, b, n, s;
  cin >> a >> b >> n >> s;
  long long x, y, z, k;
  if ((a * n + b) < s) {
    cout << "NO"
         << "\n";
    return;
  }
  x = s / n;
  if (x > a) {
    if ((s - a * n) <= b) {
      cout << "YES"
           << "\n";
      return;
    }
    cout << "NO"
         << "\n";
    return;
  }
  x = s % n;
  if (x > b) {
    cout << "NO"
         << "\n";
    return;
  }
  cout << "YES"
       << "\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long test;
  test = 1;
  cin >> test;
  while (test--) {
    solve();
  }
  return 0;
}
