The first line contains an integer $T$ indicating the number of test cases.
Each test case consists of three lines. The first line contains $12$ integers, $A_x, A_y, B_x, B_y, M_x, M_y, N_x, N_y, X_x, X_y, Y_x, Y_y$, denoting the $x$ and $y$ coordinates of points $A,B,M,N,X,Y$. The second line contains $4$ integers, $L1_{1,x}, L1_{1,y}, L1_{2,x}$, and $L1_{2,y}$, denoting two distinct points on $L1$. The third line also contains $4$ integers, $L2_{1,x}, L2_{1,y}, L2_{2,x}$, and $L2_{2,y}$, denoting two distinct points on $L2$.
* $1 \le T \le 20$
* coordinates are in the range $[0, 514]$
* $L1_1 \neq L1_2$, $L2_1 \neq L2_2$