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