#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int a, b, n, s;
    cin >> a >> b >> n >> s;
    long long int q = min(s / n, a);
    long long int rem = s - q * n;
    if (rem <= b)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
