题目描述
Programmers generally love to play chess! You too have recently acquired an interest in playing chess and you find bishop to be the most fascinating warrior of all. During a random chess practice session, you are faced with this problem :
"Two bishops are lying on the chessboard. You can move only one of them. What is the minimum number of moves required to put the two bishops in an attacking position? "
Here, a move is equivalent to moving the bishop diagonally on the chess board. If the answer is greater than or equal to 10^15, output -1.
Input Format
First line contains T , the number of test cases. Each of the next "T" lines contains X1 Y1 X2 Y2, denoting the positions of the two bishops on the chessboard.
Output Format
For each of the T test cases, output the answer as required.
Constraints
**1 ≤ T ≤ 10^5
1 ≤ X1 , X2 , Y1 , Y2 ≤ 8**
SAMPLE INPUT
2
1 1 1 2
2 2 3 3
SAMPLE OUTPUT
-1
0
输入格式
见题面
输出格式
见题面