#include <bits/stdc++.h>
using namespace std;
int main() {
  int q = 0, a = 0, b = 0, n = 0, S = 0;
  cin >> q;
  for (int i = 0; i < q; i++) {
    cin >> a >> b >> n >> S;
    if (S / n > a)
      if (S - a * n <= b)
        cout << "YES\n";
      else
        cout << "NO\n";
    else if (S % n <= b)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
