#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a < b) swap(a, b);
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int ncase;
  scanf("%d", &ncase);
  while (ncase--) {
    int a, b, n, s;
    scanf("%d%d%d%d", &a, &b, &n, &s);
    int q = s / n;
    s -= min(q, a) * n;
    if (s <= b) {
      printf("YES\n");
    } else {
      printf("NO\n");
    }
  }
}
