#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, S;
    cin >> a >> b >> n >> S;
    bool flag = false;
    if (S % n <= b && a * n + b >= S)
      flag = true;
    else
      flag = false;
    if (flag)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
