#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int main() {
  std::ios::sync_with_stdio(false);
  int q;
  long long a, b, n, s;
  cin >> q;
  while (q--) {
    cin >> a >> b >> n >> s;
    if (a * n + b < s)
      cout << "NO" << endl;
    else {
      long long cnt = min(s / n, a);
      s -= cnt * n;
      if (b >= s)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
}
