#include <bits/stdc++.h>
using namespace std;
const int mx = 2e5 + 100;
const int md = 1000000007;
priority_queue<int, vector<int> > pq;
bool compare(int a, int b) { return a < b; }
int t;
long long a, b, n, s;
bool solve() {
  long long c = 0, d = a, mid;
  while (d - c > 1) {
    mid = (c + d) / 2;
    if (mid * n > s)
      d = mid - 1;
    else
      c = mid;
  }
  if (b >= s - d * n and s - d * n >= 0) return 1;
  if (b >= s - c * n and s - c * n >= 0) return 1;
  return 0;
}
int main() {
  scanf("%d", &t);
  while (t--) {
    scanf("%lld %lld %lld %lld", &a, &b, &n, &s);
    if (solve())
      printf("YES\n");
    else
      printf("NO\n");
  }
}
