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