#include <bits/stdc++.h>
using namespace std;
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
  };
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, s;
    cin >> a >> b >> n >> s;
    bool ans = false;
    long long f = s / n;
    s -= min(f, a) * n;
    if (s <= b) {
      cout << "YES\n";
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
