The linear fractional transformations are the functions
)
mapping the extended complex plane

onto itself.
Given
%20%3D%20w_1)
,
%20%3D%20w_2)
and
%20%3D%20w_3)
, where

,

and

are pairwise distinct complex numbers and

,

and

are also pairwise distinct complex numbers, your task is to calculate
)
for a certain complex number

. It can be shown that the answer is always unique to the given contraints.
输入描述:
The input contains several test cases, and the first line contains an integer
, indicating the number of test cases.
To clarify the input format, we denote
,
,
,
,
,
and
, where
is the imaginary unit that
.
Then for each test case, the first line contains four integers
,
,
and
, the second contains four integers
,
,
and
, the third line contains four integers
,
,
and
, and the fourth line contains only two integers
and
. It is guaranteed that all these integers are in the range
and the answer
satisfies
, where
is the modulus of the complex number
.
输出描述:
For each test case, output a line containing two real numbers
and
, indicating the real part and the imaginary part of
.
Your answer is acceptable if the absolute or relative errors of both the real part and the imaginary part do not exceed
. Formally speaking, suppose that your output is
and the jury's answer is
, your output is accepted if and only if
.
示例1
输入
复制
2
-1 0 0 -1
0 1 -1 0
1 0 0 1
0 -1
-1 0 -1 0
0 1 0 -1
1 0 1 0
0 -1
输出
复制
1.000000000000000 0.000000000000000
0.000000000000000 1.000000000000000
说明
In the first sample case we have
, and in the second sample case we have
.