#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  int x, y, z, s;
  for (i = 0; i < n; i++) {
    cin >> x >> y >> z >> s;
    int k = s / z;
    k = min(k, x);
    if (k * z + y >= s)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
