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