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
		y = (B//x)*x
		if (y == B and B-x <= C) or y <= C:
			print(Y)
		else:
			print(N)
			