BETA
This is a school problem. Successful submissions of this are not counted in user ratings.

Submissions : 5539 Accuracy :

26.34

Check if given four points form a square
     

Given coordinates of four points in a plane, find if the four points form a square or not.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains 4 space separated integer points b , c , d

Output:
For each test case print 1 if the four points form a square else print 0.
Remember to output the answer of each test case in a new line.

Constraints:
1<=T<=100
1<=a,b,c,d<=100

Example:

Input
:
2
20 20 20 10 10 20 10 10
10 10 10 10 20 10 20 30

Output:
1
0

**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.