def solve(numbers):
	num=numbers[0]
	num-=numbers[1]
	if num<0:
		return 'No'
	if num<=numbers[2]:
		num+=numbers[3]
	while num != numbers[0]:
		num-=numbers[1]
		if num<0:
			break
		if num<=numbers[2]:
			num+=numbers[3]
	else:
		return 'Yes'
	return 'No'
	
n=int(input())
for i in range(n):
	print(solve(list(map(int,input().split()))))
