#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  long long a, b, c, d;
  scanf("%d", &n);
  while (n--) {
    scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
    if (a < b) {
      printf("No\n");
      continue;
    } else if (b > c) {
      long double e1 = b - a % b;
      long double f1 = c - a % b;
      long double ef = d % b;
      long long com;
      long double e;
      long double f;
      if (ef == 0) {
        e = 0;
        f = f1;
      } else {
        e = e1 / ef;
        f = f1 / ef;
      }
      com = f + 1;
      if (com <= e) {
        printf("No\n");
        continue;
      }
      printf("Yes\n");
    } else {
      long double e1 = b - a % b;
      long double f1 = c - a % b;
      long double ef = d % b;
      long long com;
      long double e = e1 / ef;
      long double f = f1 / ef;
      if (ef == 0) {
        e = e1;
        f = 0;
      } else {
        e = e1 / ef;
        f = f1 / ef;
      }
      com = e + 1;
      if (com <= f) {
        printf("No\n");
        continue;
      }
      printf("Yes\n");
    }
  }
  return 0;
}
