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