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