T = int(input()) for i in range(T): x1, y1, x2, y2, X1, Y1, X2, Y2 = map(int, input().split()) P1 = complex(x1, y1) P2 = complex(x2, y2) Q1 = complex(X1, Y1) Q2 = complex(X2, Y2) A = P1-P2 B = Q1-Q2 if A == B == 0: print("Yes") elif abs(A) > abs(B) and B != 0 and (A/B).imag == 0: print("Yes") else: print("No")