Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register
Language:
Mayan Pyramid
Time Limit: 1000MSMemory Limit: 65536K
Total Submissions: 1928Accepted: 316

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.

Sample Input

0 0 2 0 1 1.73205 1

Sample Output

1.00 0.58

Source

[Submit]   [Go Back]   [Status]   [Discuss]

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator