#include <bits/stdc++.h>
using namespace std;
long long POW(int x, int y) {
  long long sum = 1;
  for (int i = 0; i < y; i++) {
    sum *= x;
  }
  return sum;
}
int main() {
  int t;
  cin >> t;
  while (t--) {
    int a, b, n, s;
    cin >> a >> b >> n >> s;
    int temp;
    temp = s / n;
    if (a >= temp) {
      int t = temp * n;
      if (s - t <= b)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    } else {
      int left = s - a * n;
      if (left <= b)
        cout << "YES" << endl;
      else
        cout << "NO" << endl;
    }
  }
}
