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