#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio;
  cin.tie(NULL);
  cout.tie(NULL);
  int q;
  cin >> q;
  int a, b, n, s, temp, temp1, sum = 0, dif;
  for (int l = 0; l < q; l++) {
    sum = 0;
    cin >> a >> b >> n >> s;
    temp1 = b;
    if (n > s) {
      if (temp1 >= s)
        cout << "YES\n";
      else
        cout << "NO\n";
    } else if (n <= s) {
      temp = s / n;
      if (a >= temp) {
        sum = temp * n;
      } else if (a < temp) {
        sum = n * a;
      }
      dif = s - sum;
      if (b >= dif) {
        sum = sum + dif;
        if (sum == s)
          cout << "YES\n";
        else
          cout << "NO\n";
      } else
        cout << "NO\n";
    }
  }
}
