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