#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int test, a, b, n, s;
  cin >> test;
  for (long long int i = 0; i < test; i++) {
    cin >> a >> b >> n >> s;
    if (a * n + b < s || s % n > b) {
      cout << "NO"
           << "\n";
    } else {
      cout << "YES"
           << "\n";
    }
  }
}
