#include <bits/stdc++.h>
using namespace std;
int t;
long long a, b, c, d;
bool solve() {
  if (b > d) return false;
  if (b == d) {
    if ((a % b) > c) return false;
    if (a < c) return false;
    return true;
  }
  if (a < b) return false;
  a = a % b;
  if (b <= c) return true;
  long long e = d % b;
  if (e == 0) return a <= c;
  long long k = (b - 1 - a) / e;
  if (a + k * e > c) return false;
  return true;
}
int main() {
  scanf("%d", &t);
  for (int i = 1; i <= t; i++) {
    scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
    if (solve())
      printf("Yes\n");
    else
      printf("No\n");
  }
}
