#include <bits/stdc++.h>
using namespace std;
void sol() {
  int a, b, n, s;
  cin >> a >> b >> n >> s;
  if (a * 1ll * n + b < s || s % n > b)
    cout << "NO\n";
  else
    cout << "YES\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  for (int i = 0; i < t; i++) sol();
  return 0;
}
