#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5, M = 1e6 + 6, OO = 0x3f3f3f3f;
int tc;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> tc;
  while (tc--) {
    long long a, b, n, s;
    cin >> a >> b >> n >> s;
    long long k = min(a, s / n);
    long long y = min(b, s - (k * n));
    if (n * k + y == s)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
