#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, a, b, n, s, i, x, y, z, m, c, p, d, f, g;
  cin >> t;
  for (i = 0; i < t; i++) {
    cin >> a >> b >> n >> s;
    x = s / n;
    y = s % n;
    m = s - b;
    m = m / n;
    d = s - (x * n);
    p = (a * n) + b;
    if (y != 0 && d > b) {
      cout << "NO" << endl;
    } else if (x <= a && y <= b) {
      cout << "YES" << endl;
    } else if (m <= a && p >= s) {
      cout << "YES" << endl;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
