import sys input = sys.stdin.readline T = int(input()) for _ in range(T): ax, ay, bx, by, cx, cy = map(int, input().split()) if cy*(ax*bx-ay*by) == cx*(ay*bx+by*ax): print("Yes") else: print("No")