There are six points ABMNXYABMNXY in a two-dimensional plane.
As shown in the figure below, ABNMABNM and XYNMXYNM are both in convex quadrilateral shapes, and their intersection area is 00. You are also given two lines L1L1 and L2L2. You have to choose one point on each line (for example, SS on L1L1 and TT on L2L2) so that the area of ABSABS, MSNTMSNT, and XYTXYT are at the same size. Moreover, SS should lie within or be on the border of ABNMABNM, and TT should lie within or be on the border of XYNMXYNM. Please output the positions of SS and TT that you choose!
Input
The first line contains an integer TT indicating the number of test cases.
Each test case consists of three lines. The first line contains 1212 integers, Ax,Ay,Bx,By,Mx,My,Nx,Ny,Xx,Xy,Yx,YyAx,Ay,Bx,By,Mx,My,Nx,Ny,Xx,Xy,Yx,Yy, denoting the xx and yy coordinates of points A,B,M,N,X,YA,B,M,N,X,Y. The second line contains 44 integers, L11,x,L11,y,L12,xL11,x,L11,y,L12,x, and L12,yL12,y, denoting two distinct points on L1L1. The third line also contains 44 integers, L21,x,L21,y,L22,xL21,x,L21,y,L22,x, and L22,yL22,y, denoting two distinct points on L2L2.
* 1≤T≤201≤T≤20
* coordinates are in the range [0,514][0,514]
* L11≠L12L11≠L12, L21≠L22
Output
For each test case output 44 numbers in a single line, Sx,Sy,Tx,TySx,Sy,Tx,Ty, denoting the two chosen points. If there are multiple solutions, output the one with the smallest SxSx. If there are still multiple solutions, output the one with the smallest SySy, and then the smallest TxTx, and then the smallest TyTy. Otherwise, if there are no solution, output "-1" (without quotes) in one line. A solution with an absolute error at most 10−610−6 will be accepted.