Rotate Page
##### Submissions: 331   Accuracy: 21.7%   Difficulty: Basic   Marks: 1

You are given three points a, b, c on a page. Find if it’s possible to rotate the page around the point by an angle, such that the new position of ‘a’ is same as the old position of ‘b’, and the new position of ‘b’ is same as the old position of ‘c’. If such angle exists print “1”, else “0”.

Examples:
Input : a1 = 0, a2 = 1, b1 = 1, b2 =  1,
c1 = 1, c2 = 0
Output : 1(means Yes)

Explanation : Rotate the page by 90 degree.
Input : a1 = 1, a2 = 1, b1 = 0, b2 = 0,
c1 = 1000, c2 = 1000
Output : 0(means No)

Input :
The first line of input contains an integer T denoting the Test cases. Then T test cases follow.
Second line contains a1, a2, b1, b2, c1, c2.

Output :
1 if it is possible to rotate the page; else 0

Constraints :
1 ≤ T ≤ 100
0 ≤ a1, a2, b1, b2, c1, c2 ≤ 100

Example:
Input :
2
1 1 1 1 1 0
0 1 1 1 1 0

Output :
0
1

#### ** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Mohit Gupta_OMG :)
Author: Mohit Gupta 4

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.