T = int(input())
for i in range(T):
	A,B,C,D = map(int,input().split(" "))
	if A < B:
		print("No")
		continue
	if D < B:
		print("No")
		continue

	if (A % B) > C:
		print("No")
		continue

	if C >= (B):
		print("Yes")
		continue

	dif = (D - B)
	if dif == 0:
		print("Yes")
		continue

	c = (C // dif)
	#print(B//dif,C // dif)
	if (C % dif) == 0:
		if (C + dif) >= B:
			print("Yes")
		else:
			print("No")
	else:
		if (C - (C % dif)) + dif >= B:
			print("Yes")
		else:
			print("No")
