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

Problem A. 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 A and ends at B , the second starts at C and ends at D . We name the two horizontal axes as X,Z , and the vertical axis as Y . The coordinate point of the end portal P is the intersection of two lines AB,CD in the projection plain XOZ . You need to calculate the coordinate of P .

输入

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

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

输出

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

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 10^{-2} . In other word, suppose your answer is a , and the standard answer is a' , your answer will be correct when \dfrac{|a-a'|}{\max(1,a')}\le10^{-2} .

样例

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

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

A B C

C题表述有误,已将所有变量 m 修正为 k
因实际参赛人数过少,热身赛将延长一天。
为了降低A题的难度,放宽了A题的进度限制,现在只需要误差小于10^{-2}即可。
A题请输出较多的小数位数,否则达不到精度要求。