test_cases = input()

for test_case in range(test_cases):
	A, B, C, D = map(int, raw_input().split(' '))

	last_take = max(1, (A - C + B - 1) / B)
	A -= last_take * B

	if B <= D and A >= 0:
		printed = False

		if B == D or B <= C:
			print "Yes"
			printed = True
		else:
			print "No"

		# if printed is False:
		# 	for i in range(10000):
		# 		x = (C - A) / (D - B) + 1
		# 		A += (D - B) * x
		# 		last_take = max(1, (A - C + B - 1) / B)
		# 		A -= last_take * B

		# 		if A < 0:
		# 			print "No"
		# 			printed = True
		# 			break
			
		#you're doing jumps with size D - B
		# if printed is False:
		# 	print "Yes"
	else:
		print "No"
