#include <bits/stdc++.h>
using namespace std;
long long a, b, n, s;
int main() {
  int q;
  cin >> q;
  while (q--) {
    cin >> a >> b >> n >> s;
    if (a * n > s) {
      if (s % n <= b) {
        cout << "YES\n";
      } else
        cout << "NO\n";
    } else if (a * n == s) {
      cout << "YES\n";
    } else {
      if (s - a * n <= b) {
        cout << "YES\n";
      } else
        cout << "NO\n";
    }
  }
  return 0;
}
