#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b, n, s;
  cin >> a >> b >> n >> s;
  int x = min(a, s / n);
  int y = min(b, s - x * n);
  cout << (x * n + y >= s ? "YES" : "NO") << "\n";
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
}
