The input contains multiple cases. The first line of the input contains a single integer TTT (1≤T≤10001 \leq T \leq 1\,0001≤T≤1000), indicating the number of test cases.
For each case, each of the two lines contains four integers x1,y1,x2x_1,y_1,x_2x1,y1,x2 and y2y_2y2 (−1000≤x1,y1,x2,y2≤1000-1\,000 \le x_1, y_1, x_2, y_2 \le 1\,000−1000≤x1,y1,x2,y2≤1000), denoting a segment that connects (x1,y1)(x_1, y_1)(x1,y1) and (x2,y2)(x_2, y_2)(x2,y2). It is guaranteed that the two endpoints of each segment do not coincide, and that the two segments are perpendicular to each other.