#include <bits/stdc++.h>
using namespace std;
template <typename T>
void printmatrix(vector<vector<T> > ar) {
  for (int i = 0; i < (int)ar.size(); i++) {
    for (int j = 0; j < (int)ar[0].size(); j++) {
      cout << ar[i][j];
    }
    cout << endl;
  }
}
template <typename T>
void printvector(vector<T> vec) {
  for (int i = 0; i < (int)vec.size(); i++) {
    cout << vec[i] << endl;
  }
}
template <typename T>
void unique(vector<T>& vec) {
  sort(vec.begin(), vec.end());
  vec.erase(unique(vec.begin(), vec.end()), vec.end());
}
template <typename T>
vector<T> cumsum(vector<T> vec) {
  vector<T> newvec((T)vec.size());
  int tmp = 0;
  for (int i = 0; i < (int)vec.size(); i++) {
    tmp += vec[i];
    newvec[i] = tmp;
  }
  return newvec;
}
template <typename T>
T digitsum(T x) {
  T y = 0;
  while (x) {
    y += x % 10;
    x /= 10;
  }
  return y;
}
bool forever(long long a, long long b, long long c, long long d) {
  if (a < b || b > d) {
    return false;
  }
  if (a >= b && c >= b && d >= b) {
    return true;
  }
  a = a % b;
  for (long long i = 0; i < 100000; i++) {
    a = a % b + (a % b <= c) * d;
    if (a - b < 0) {
      return false;
    }
  }
  return true;
}
int main(int argc, char const* argv[]) {
  int T;
  cin >> T;
  long long a, b, c, d;
  for (int i = 0; i < T; i++) {
    cin >> a >> b >> c >> d;
    if (forever(a, b, c, d)) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
