#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int q;
  cin >> q;
  while (q--) {
    int a, b, n, s;
    cin >> a >> b >> n >> s;
    if ((min(s / n, a) * n) + (min(b, s - (min(s / n, a) * n))) == s)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
