#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, a, b, c, d, e, f, g;
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> a >> b >> c >> d;
    e = a % b;
    f = d % b;
    if (b < c)
      cout << "Yes" << endl;
    else if (c > b) {
      for (int i = e - f; i <= c; i += f) {
        g = i;
      }
      if (g >= b)
        cout << "Yes" << endl;
      else
        cout << "No" << endl;
    }
  }
  return 0;
}
