#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  long long q;
  cin >> q;
  while (q--) {
    long long a, b, n, s;
    cin >> a >> b >> n >> s;
    if (s / n <= a)
      s = s % n;
    else
      s = s - (a)*n;
    if (s <= b)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
