for i in range(int(input())):A,a,B,b,C,c=map(int,input().split());print("YNeos"[C*(a*B+b*A)!=c*(A*B-a*b)::2])