#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t, i, a, b, n, s, q, c[10000];
  cin >> q;
  for (i = 0; i < q; i++) {
    c[i] = 0;
    cin >> a >> b >> n >> s;
    t = s / n;
    if (min(t, a) * n + b >= s) c[i] = 1;
  }
  for (i = 0; i < q; i++) {
    if (c[i] == 0)
      cout << "NO\n";
    else
      cout << "YES\n";
  }
}
