#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(0);
  int t;
  std::cin >> t;
  while (t--) {
    int a, b, n, s;
    std::cin >> a >> b >> n >> s;
    if (s / n > a && s - a * n <= b)
      std::cout << "YES\n";
    else if (s / n <= a && s % n <= b)
      std::cout << "YES\n";
    else
      std::cout << "NO\n";
  }
}
