#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
template <typename T, typename T2>
inline void _max(T &a, T2 b) {
  a = max((T)a, (T)b);
}
template <typename T, typename T2>
inline void _min(T &a, T2 b) {
  a = min((T)a, (T)b);
}
long long A, B, C, D;
void clear() {}
void read() {
  scanf("%lld%lld", &A, &B);
  scanf("%lld%lld", &C, &D);
}
void solve() {
  int res = 0;
  if (A < B)
    res = 0;
  else if (C >= B)
    res = 1;
  else {
    if (D % B == 0) {
      long long R = A % B;
      res = R <= C;
    } else
      res = 0;
  }
  printf(res ? "Yes\n" : "No\n");
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    clear();
    read();
    solve();
  }
  return 0;
}
