#include <bits/stdc++.h>
using namespace std;
long long n, a, b, c, d;
int main() {
  scanf("%lld", &n);
  for (long long i = 1; i <= n; i++) {
    scanf("%lld %lld %lld %lld", &a, &b, &c, &d);
    if (a % b > c or a < b) {
      printf("No\n");
      continue;
    }
    long long e = a % b + d;
    if (e % b > c or e < b) {
      printf("No\n");
      continue;
    }
    long long e2 = e % b + d;
    if (e2 % b > c or e2 < b) {
      printf("No\n");
      continue;
    }
    long long art = (e2 - e + b) % b;
    if (art == 0) {
      printf("Yes\n");
      continue;
    }
    long long ilk = a % b;
    long long ger = b - ilk - 1;
    long long k = ger / art;
    if (k * art + ilk > c) {
      printf("No\n");
      continue;
    }
    printf("Yes\n");
  }
  return 0;
}
