n = int(input())
for _ in range(n):
	a,b,c,d = (int(i) for i in input().split())
	if a<b or b>d or c<a%b: print("No")
	else:
		if b==d: print("Yes")
		else:
			e = a-((a-c+1)//b+1)*b
			if (c-e)//(d-b)==(c-e)/(d-b):
				if c+d>=2*b: print("Yes")
				else: print("No")
			elif int((c-e)/(d-b))+1<(b-e)/(d-b): print("No")
			else: print("Yes")