#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 1e5 + 10;
long long T, a, b, n, s;
int main() {
  scanf("%lld", &T);
  while (T--) {
    scanf("%lld%lld%lld%lld", &a, &b, &n, &s);
    if (a * n < s) {
      if (b >= s - a * n)
        puts("YES");
      else
        puts("NO");
    } else if (a * n == s)
      puts("YES");
    else {
      long long ans = s % n;
      if (b >= ans)
        puts("YES");
      else
        puts("NO");
    }
  }
  return 0;
}
