#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, n, s;
    cin >> a >> b >> n >> s;
    long long int temp = s % n;
    if (n == 0 || b == 0) {
      cout << "NO" << endl;
    } else if (temp <= b) {
      if (ceil(s - b) / n <= a)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
