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