#include <bits/stdc++.h>
using namespace std;

long long gcd(long long a, long long b) {
   if(b == 0) return a;
   return gcd(b, a % b);
}

void solve() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;

  if (d < b || a < b) {
    cout << "No" << endl;
    return;
  }

  if (b <= c + 1) {
    cout << "Yes" << endl;
    return;
  }

  long long g = gcd(b, d);
  long long k = (b - a % b + g - 1) / g  - 1;
  long long mx = a % b + k * g;
  if (mx <= c) {
    cout << "Yes" << endl;
    return 0;
  }

  cout << "No" << endl;

}
