As a student of applied mathematics school of UESTC, WCM likes mathematics. Recently he is absorbed in geometry. But a very easy problem puzzled him. He can't know how to determine whether a quadrilateral is a parallelogram or not. How poor he is! He believes that you, who are regarded as one of his smartest friend, can solve this problem easily.
Given two segments, AC and BD, you should determine whether quadrilateral ABCD is a parallelogram whose diagonals are AC and BD.
The first line contains a positive integer T
, which means the number of test cases. For each test case, the first line contains four integers X1
) is the coordinates of A and (X3
) is the coordinates of C. The second line consists of four integers X2
) is the coordinates of B and (X4
) is the coordinates of D. You can assume that points A, B, C and D are different from each other.
For each test case, if quadrilateral ABCD is a parallelogram whose diagonals are AC and BD, then output Yes on a line; otherwise, output No.
All the coordinates are between -1000 and 1000.
-1 -1 3 3
-2 0 4 2
-1 -2 3 4
3 7 6 9