#include <bits/stdc++.h>
#pragma warning(disable : 4996)
int main() {
  int c;
  scanf("%d", &c);
  for (int tt = 1; tt <= c; tt++) {
    long long a, b, n, s;
    scanf("%lld%lld%lld%lld", &a, &b, &n, &s);
    if (a * n >= s) {
      s = s % n;
    } else if (a * n < s) {
      s -= a * n;
    }
    if (s <= b) {
      printf("YES\n");
    } else
      printf("NO\n");
  }
  return 0;
}
