#include <bits/stdc++.h>
int main(void) {
  int t;
  scanf("%d", &t);
  for (int i = 0; i < t; i++) {
    long long int a, b, c, d;
    scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
    if (b > a || a % b > c || b > d) {
      printf("No\n");
      continue;
    }
    if (a % b <= c && a % b + d == a) {
      printf("Yes\n");
      continue;
    }
    long long int stock = a % b;
    if (stock <= c && d % b == 0) {
      printf("Yes\n");
      continue;
    }
    if (b - c > d % b) {
      printf("No\n");
      continue;
    }
    if (b - c == d % b && c % (d % b) != 0) {
      printf("No\n");
      continue;
    }
    printf("Yes\n");
  }
  return 0;
}
