#include <bits/stdc++.h>
using namespace std;
void put(int x) {
  if (x < 0) {
    putchar('-');
    x *= -1;
  }
  if (x == 0) {
    putchar('0');
  }
  int num = 0;
  char c[15];
  while (x) {
    c[++num] = (x % 10) + 48;
    x /= 10;
  }
  while (num) {
    putchar(c[num--]);
  }
  putchar('\n');
}
inline void in(int &x) {
  char ch = getchar();
  int flag = 1;
  while (!(ch >= '0' && ch <= '9')) {
    if (ch == '-') flag *= -1;
    ch = getchar();
  }
  x = ch - '0';
  ch = getchar();
  while (ch >= '0' && ch <= '9') {
    x = ((x << 3) + (x << 1)) + ch - '0';
    ch = getchar();
  }
  x *= flag;
}
int t;
int main() {
  in(t);
  while (t--) {
    long long a, b, n, s;
    cin >> a >> b >> n >> s;
    s -= min(n * a, s / n * n);
    if (s <= b)
      cout << "YES" << '\n';
    else
      cout << "NO" << '\n';
  }
  return 0;
}
