#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long int a, b, n, S;
    cin >> a >> b >> n >> S;
    long long int total = a * n, t2 = (a - 1) * (n);
    long long int m = S / n;
    if (min(a, m) * n <= S) {
      if (S - (n * min(m, a)) <= b) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    } else {
      if (S - (n * min(m, a - 1)) <= b) {
        cout << "YES\n";
      } else {
        cout << "NO\n";
      }
    }
  }
}
