#include <bits/stdc++.h>
int main() {
  long long q;
  scanf("%lld", &q);
  while (q--) {
    long long a, b, n, k;
    scanf("%lld %lld %lld %lld", &a, &b, &n, &k);
    long long x = a * n + b;
    if (x < k)
      printf("NO\n");
    else if (x == k)
      printf("YES\n");
    else {
      long long y = a * n;
      if (y <= k)
        printf("YES\n");
      else {
        long long left = k % n;
        if (left <= b)
          printf("YES\n");
        else
          printf("NO\n");
      }
    }
  }
}
