BETA

Difficulty Level: Easy

Submissions: 1841 Accuracy:

25.96%

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 Input/Output Examples Use 'Expected Output' option **

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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