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