import sys
nabory = int(sys.stdin.readline())
# n = int(sys.stdin.readline())
def solv():
	try:
		for i in range(nabory):
			n = int(input())
			for j in range(n):
				nums = (int, input().split())
				if(nums[-1] + nums[1] >= 2 * nums[1]):
					print("YES")
				else:
					print("NO")
	except ValueError:
		print("NO")
    
            
if __name__ == '__main__':
	print(solv())
