#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b, c, d;
    cin >> a >> b >> c >> d;
    if (d % c <= b && a * c + b >= d) {
      cout << "yes" << endl;
    } else
      cout << "no" << endl;
  }
}
