n = int(input())
li=[]
re=[]
for i in range(n):
	li.append(list(map(int,input().split())))
	if li[i][0] < li[i][1]:
		 re.append("No")
	elif li[i][1] > li[i][3]:
		 re.append("No")
	else:
		Lim=li[i][0]%li[i][1]
		a=li[i][3]-li[i][1]
		if a == 0:
			pass
		else:
			while Lim+a<li[i][1]:
				Lim=Lim+a
		if li[i][2] >= Lim:
			re.append("Yes")
		else:
			re.append("No")
for value in re:
 print(value)