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