Y = "Yes"
N = "No"
T = int(input())
for _ in range(T):
	A, B, C, D = [int(x) for x in input().split()]
	if A < B or B > D:
		print(N)
	elif B <= C:
		print(Y)
	else:
		if A > C:
			A -= ((A-C)//B)*B
			if A > C:
				A -= B
		if A < 0:
			print(N)
			continue
		x = D-B
		if x == 0:
			print(Y)
			continue
		B-=A
		C-=A
		if B%x==0:
			if B-x>C:
				print(N)
			else:
				print(Y)
		elif (B//x)*x>C:
			print(N)
		else:
			print(Y)
			