#include <bits/stdc++.h>
using namespace std;
int main(int argc, char* args[]) {
  int t;
  cin >> t;
  while (t--) {
    unsigned long long MaxCapacity, EverydayJuice, FillIfLess, NewCans;
    cin >> MaxCapacity >> EverydayJuice >> FillIfLess >> NewCans;
    bool g = false;
    if (MaxCapacity < EverydayJuice || NewCans < EverydayJuice) {
      cout << "No\n";
      continue;
    }
    unsigned long long CurMod = MaxCapacity % EverydayJuice;
    if (CurMod > FillIfLess) {
      cout << "No\n";
      continue;
    }
    if (NewCans == EverydayJuice) {
      cout << "Yes\n";
      continue;
    }
    unsigned long long DifferenceMod = (NewCans - EverydayJuice);
    unsigned long long firstAns =
        ((FillIfLess + 1) - CurMod + DifferenceMod - 1) / DifferenceMod;
    firstAns *= DifferenceMod;
    firstAns += CurMod;
    firstAns %= EverydayJuice;
    if (firstAns > FillIfLess) {
      cout << "No\n";
      continue;
    }
    unsigned long long toIncrease2 =
        (EverydayJuice - firstAns + DifferenceMod - 1) / DifferenceMod *
        DifferenceMod;
    firstAns += toIncrease2;
    firstAns %= EverydayJuice;
    firstAns += ((FillIfLess + 1) - firstAns + DifferenceMod - 1) /
                DifferenceMod * DifferenceMod;
    firstAns %= EverydayJuice;
    if (firstAns > FillIfLess) {
      cout << "No\n";
      continue;
    }
    cout << "Yes\n";
  }
}
