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