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