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