#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long a, b, n, s, t, p, bal, ans;
  cin >> t;
  while (t--) {
    cin >> a >> b >> n >> s;
    p = s / n;
    ans = min(p, a);
    bal = s - ans * n;
    if (bal <= b)
      cout << "YES\n";
    else
      cout << "NO\n";
  }
  return 0;
}
