t = gets.to_i
a=[], b=[],c=[],d=[]
t.times do |i|
	a[i],b[i],c[i],d[i] = gets.split.map(&:to_i)
end

t.times do |i|
	aa = a[i].to_i
	bb = b[i].to_i
	cc = c[i].to_i
	dd = d[i].to_i

	if aa < bb
		puts 'No'
		next
	end


	if bb > dd
		puts 'No'
		next
	end


	flag = true
	res = aa % bb
	tmp = dd % bb
	while res < bb
		if cc < res
			flag = false
			break
		end
		if tmp == 0
			break
		end
		res += tmp
	end

	if flag
		puts 'Yes'
		next
	else
		puts 'No'
		next
	end
end