BETA

Submissions : 1241 Accuracy :

30.14

Is Square
     

Given four different points in space. Find these points can form a square or not.

Input:

The first line of input contains an integer T denoting the number of test cases.
The first line of each test case contains x1, y1, x2, y2, x3, y3, x4, y4 (four points coordinates).

Output:

Print "Yes" (without quotes) if it is square else "No".

Constraints:

1 ≤ T ≤ 30
1 ≤ x1, x2, x3, x4, y1, y2, y3, y4 ≤ 100

Example:

Input
1
20 10 10 20 20 20 10 10

Output
Yes

 

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.