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