#include <bits/stdc++.h>
long long int T, A, B, C, D;
int main() {
  std::cin >> T;
  for (int loop = 0; loop < T; ++loop) {
    std::cin >> A >> B >> C >> D;
    if (A < B || B > D)
      std::cout << "No" << std::endl;
    else if (C >= B)
      std::cout << "Yes" << std::endl;
    else if (D % B == 0)
      std::cout << (A % B <= C ? "Yes" : "No") << std::endl;
    else {
      long long int cnt = B / (D % B);
      if (B % (D % B) == 0) --cnt;
      std::cout << ((D % B) * cnt <= C ? "Yes" : "No") << std::endl;
    }
  }
  return 0;
}
