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