#include <bits/stdc++.h>
int main(void) {
  int i, T, A, B, C, D, X;
  scanf("%d", &T);
  for (i = 0; i < T; i++) {
    scanf("%d %d %d %d", &A, &B, &C, &D);
    X = A;
    while (1) {
      if (X <= 0) break;
      X = X - B;
      if (X <= C) {
        X += D;
      }
    }
    if (X == 0) {
      printf("Yes\n");
    } else if (X < 0) {
      printf("No\n");
    }
  }
  return 0;
}
