#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    long long a, n, b, S;
    cin >> a >> b >> n >> S;
    long long sum = 0, flag = 0, flag2 = 0;
    sum += a * n;
    if (S >= sum) {
      long long diff = S - sum;
      if (b >= diff)
        cout << "YES"
             << "\n";
      else
        cout << "NO"
             << "\n";
    } else {
      S %= n;
      if (b >= S)
        cout << "YES"
             << "\n";
      else
        cout << "NO"
             << "\n";
    }
  }
  return 0;
}
