t = int(input())
a=[]
b=[]
c=[]
d=[]
for i in range(t):
	e,f,g,h = map(int,input().split())
	a.append(e)
	b.append(f)
	c.append(g)
	d.append(h)

for i in range(t):
	if(b[i] == c[i] +1):
		print("Yes")

	elif(a[i] < b[i] or  (d[i] % b[i]) != 0):
		print("No")
	else:
		print("Yes")