1755. End Portal

It seemed like a dream, a long long but sweet sweet dream. In the dream, every day is Sunday.

Seemingly a long time ago, Yunyan was playing Minecraft with Hefeng. It's known to us all that we can locate end portal by throwing two ender pearls. When throwing one ender pearl, it's trail forms a spatial line. And the end portal is located at the intersection point of the two lines at the projection plain. So Yunyan threw two pearls, and you need to calculate where is the end portal located.

Suppose the trial of the first pearl starts at coordinate point of AA and ends at BB , the second starts at CC and ends at DD . We name the two horizontal axes as X,ZX,Z , and the vertical axis as YY . The coordinate point of the end portal PP is the intersection of two lines AB,CDAB,CD in the projection plain XOZXOZ . You need to calculate the coordinate of PP .

输入

Input four lines. Each line contains three integers xi,yi,zix_i,y_i,z_i , stands for the coordinates of a spatial point A,B,C,DA,B,C,D in order.

It's guaranteed that solution must exist. That is, AB,CDAB,CD are not parallel in XOZXOZ and no two points are the same in coordinates. And xi,yi,zi104|x_i|,|y_i|,|z_i|\le10^4 .

输出

Output a single line with two real number stands for the X,ZX,Z coordinates of point PP .

Your answer will be regarded correct if and only if either the relative error or the absolute error between your answer and the standard answer is no more than 10210^{-2} . In other word, suppose your answer is aa , and the standard answer is aa' , your answer will be correct when aamax(1,a)102\dfrac{|a-a'|}{\max(1,a')}\le10^{-2} .

样例

标准输入 复制文本
0 64 0
0 81 12
-100 70 100
-88 85 100
标准输出 复制文本
0 100

来源

2022 软件学院 ACM 集训队筛选赛 (热身赛)

登录以提交代码。
单点时限 1 秒
内存限制 128 MB
提交 48
通过 18