def solve(): ax,ay,bx,by,cx,cy = map(int,input().split()) x = ax * bx - ay * by y = ax *by + ay * bx if x * cy == y * cx and cx * x >= 0: print("Yes") else: print("No") T = int(input()) for _ in range(T): solve()