#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
int main() {
  long long i, j, k, n, q, a, b, s, amount;
  string s1, s2;
  cin >> q;
  while (q--) {
    cin >> a >> b >> n >> s;
    int mod = s % n;
    if (mod > b) {
      cout << "NO\n";
    } else {
      int big = (s - mod) / n;
      if (a * n + b >= s) {
        cout << "YES\n";
      } else
        cout << "NO\n";
    }
  }
}
