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