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