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