T=int(input()) for _ in range(T): ax,ay,bx,by,cx,cy=map(int,input().split()) print(["No","Yes"][cy*(ax*bx-ay*by)==cx*((ay*bx)+(by*ax))])