#include <bits/stdc++.h>
using namespace std;
int main() {
  int q;
  cin >> q;
  while (q--) {
    int a, b, n, s;
    cin >> a >> b >> n >> s;
    if (b >= s) {
      cout << "YES\n";
      continue;
    }
    int val = s / n;
    int k;
    if (val <= a)
      k = val;
    else
      k = a;
    s -= (k * n);
    if (b >= s) {
      cout << "YES\n";
      continue;
    } else {
      cout << "NO\n";
    }
  }
  return 0;
}
