#include <bits/stdc++.h>
using namespace std;
double dat[100][100];
int dp[1000001];
int prime[1000001];
int main() {
  long a, b, c, d;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a >> b >> c >> d;
    if (a < b) {
      cout << "No" << endl;
      continue;
    } else if (a % b > c) {
      cout << "No" << endl;
      continue;
    } else if (a % b + d == a) {
      cout << "Yes" << endl;
      continue;
    } else if (b % 2 == 1 && d % b + c <= b) {
      cout << "No" << endl;
      continue;
    } else if (b % 2 == 0 && d % b + c < b) {
      cout << "No" << endl;
      continue;
    } else {
      cout << "Yes" << endl;
      continue;
    }
    cout << "No" << endl;
  }
  return 0;
}
