Given coordinates of four points in a plane, find if the four points form a square or not.
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 a , b , c , d
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.
1 <= T <= 200
1 <= a,b,c,d <= 100
20 20 20 10 10 20 10 10
10 10 10 10 20 10 20 30
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.