#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 (a / b == 0 || b > d) {
      printf("No\n");
      continue;
    }
    int stock = a % b;
    if (stock > c) {
      printf("No\n");
      continue;
    }
    int yes = 1;
    for (int i = 0; i < b; i++) {
      stock += d;
      stock %= b;
      if (stock > c) {
        printf("No\n");
        yes = 0;
        break;
      }
    }
    if (yes) printf("Yes\n");
  }
  return 0;
}
