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