#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  cin >> t;
  while (t--) {
    long long a, b, n, s;
    cin >> a >> b >> n >> s;
    cout << (b >= s - n * min(a, s / n) ? "YES" : "NO") << "\n";
  }
  return 0;
}
