#include <bits/stdc++.h>
using namespace std;
long long int n, a[500000], aho, b[500000], c[500000], d[500000];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i] >> b[i] >> c[i] >> d[i];
  }
  for (int i = 0; i < n; i++) {
    aho = 0;
    if (b[i] == d[i])
      aho = 1;
    else {
      long long int temp = d[i] - b[i];
      if (b[i] % 2 == 0 && a[i] % 2 == 0) {
        if (c[i] + temp >= b[i]) aho = 1;
      }
      if (b[i] % 2 == 1 && a[i] % 2 == 0) {
        if (c[i] + temp >= b[i] + 1) aho = 1;
      }
      if (b[i] % 2 == 0 && a[i] % 2 == 1) {
        if (c[i] + temp >= b[i]) aho = 1;
      }
      if (b[i] % 2 == 1 && a[i] % 2 == 1) {
        if (c[i] + temp >= b[i] + 1) aho = 1;
      }
    }
    if (a[i] % b[i] <= c[i] && b[i] <= d[i] && a[i] >= b[i] && aho == 1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
