Brocard Point

Given the coordinates of a triangle's vertices in anticlockwise order, compute the coordinates of its Brocard point and print them to five decimal places.

Medium7GeometryMathImplementationBrute forceNo attempts yetTime limit2sMemory limit512 MB

Problem

Label the vertices of a triangle in anticlockwise order as A, B and C. Inside triangle ABC there is exactly one point P with PAB=PBC=PCA\angle PAB = \angle PBC = \angle PCA. That point is called the Brocard point.

Given the coordinates of A, B and C, write a program that computes the coordinates of the Brocard point of triangle ABC.

Input

The first line contains the number of test cases tt (1t100001 \le t \le 10000).

Each of the next tt lines contains six space separated real numbers xAx_A, yAy_A, xBx_B, yBy_B, xCx_C, yCy_C. Every coordinate has absolute value at most 10001000 and at most six digits after the decimal point. The three points are not collinear and are given in anticlockwise order.

Output

For each test case, print the xx coordinate and the yy coordinate of the Brocard point on one line, separated by a space, each rounded to five decimal places. Always print all five digits after the decimal point. If a rounded coordinate is zero, print 0.00000 with no sign.