#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  i64 init, demand, bound, add;
  int tsk;
  cin >> tsk;
  while (tsk--) {
    cin >> init >> demand >> bound >> add;
    if (init < demand) {
      cout << "No\n";
      continue;
    }
    if (add < demand) {
      cout << "No\n";
      continue;
    }
    if (bound >= demand) {
      cout << "Yes\n";
      continue;
    }
    init = init % demand;
    add %= demand;
    if (add == 0) {
      cout << (init > bound && init < demand ? "No\n" : "Yes\n");
      continue;
    }
    init += (demand - init - 1) / add * add;
    if (init > bound)
      cout << "No\n";
    else
      cout << "Yes\n";
  }
  return 0;
}
