#P3711. Mayan Pyramid

Mayan Pyramid

Description

When a king dies, Mayan people build a pyramid as a monument. The pyramid is a tetrahedron. So the bottom of the pyramid is a triangle. One side of the triangle represents the year of the kings death, another represents the month, and the last represents the day. The height of the pyramid represents the king's age.

In the following picture, we see a Mayan pyramid. We have already known the coordinates of A, B and C. And we know the height of P. Q is the projection of P. Because of the Mayan religion, they want PD2+PE2+PF2 to be as small as possible.

Input

The input consists of one or more test cases ended with EOF. Each line contains one test case. Each test case contains 7 non-negative float numbers meaning the coordinates of A, B, C and the height of P. All numbers are less than 1000.

Output

For each test case, output the coordinates of Q in a single line. Round all numbers to the second digit after the decimal point.
0 0 2 0 1 1.73205 1
1.00 0.58

Source

POJ Founder Monthly Contest – 2008.12.28

, Panda