import math import sys input = sys.stdin.read def main(): data = input().split() t = int(data[0]) index = 1 results = [] for _ in range(t): Ax = int(data[index]) Ay = int(data[index+1]) Bx = int(data[index+2]) By = int(data[index+3]) Cx = int(data[index+4]) Cy = int(data[index+5]) index += 6 angleA = math.atan2(Ay, Ax) angleB = math.atan2(By, Bx) angleC = math.atan2(Cy, Cx) if angleA + angleB >= angleC: results.append("Yes") else: results.append("No") print("\n".join(results)) main()