#include<iostream>
using namespace std;

int gcd(int a, int b)
{
	if(a<b)
	{
		int tmp = a;
		a = b;
		b = tmp;
	}
	int r = a % b;
	while(r!=0)
	{
		a = b;
		b = r;
		r = a % b;
	}
	return b
}

int main()
{
	int T;
	cin >> T;
	bool is_ok[T];
	int A,B,C,D,R;
	for(int i=0;i<T;i++)
	{
		cin >> A >> B >> C >> D;
		if(D<B)		continue;
		if(C<A%B)	continue;
		if(C/gcd(B,D)<B-1)	continue;
		is_ok[i] = true;
	}
	for(int i=0;i<T;i++)
		if(is_ok[i]) 	cout << "Yes" << std::endl;
		else			cout << "No" << std::endl;
	return 0;
}