#include <bits/stdc++.h>
using namespace std;
int main() {
  long long T, A, B, C, D;
  std::cin >> T;
  for (int i = 0; i < T; i++) {
    std::cin >> A >> B >> C >> D;
    if (B > D || A < B) {
      std::cout << "No" << std::endl;
      continue;
    }
    if (B <= C) {
      std::cout << "Yes" << std::endl;
      continue;
    }
    if (A % B > C) {
      std::cout << "No" << std::endl;
      continue;
    }
    if (D % B != 0) {
      if (ceil((double)(B - A % B) / (D % B)) -
              floor((double)(C - A % B) / (D % B)) >
          1) {
        std::cout << "No" << std::endl;
        continue;
      } else {
        std::cout << "Yes" << std::endl;
        continue;
      }
    } else {
      std::cout << "Yes" << std::endl;
      continue;
    }
  }
}
