T=input()
for i in range(T):
	A,B,C,D=map(int,raw_input().split())
	if A<B:
		print "No"
	elif B>D:
		print "No"
	else:
		A=B+A%B
		D=B+D%B
		#print A,B,C,D
		if A==B==D:
			print "Yes"
		elif abs(B-C)-1>=1:
			if abs(B-C)-1==1 and ((B+C)/2)%2==1 and ( A%2 or B%2 or D%2 )==0:
				print "Yes"
			elif A%B<=C and B==D:
				print "Yes"
			else:
				print "No"
		elif abs(B-C)-1==0:
			print "Yes"

