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 |