ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

Open Ural FU Championship 2012

About     Problems     Submit solution     Judge status     Standings
Contest is over

H. Caribbean Triangle

Time limit: 1.0 second
Memory limit: 64 MB
Will: How can we sail to an island that nobody can find with a compass that doesn't work?
Jack: Aye, the compass doesn't point north. But we're not trying to find north, are we?
Once Jack heard the legend of the treasure of the de Ficit family. After drinking enough rum in the surrounding pubs and collecting rumors, he learned the details. An ancient legend says that there are three seals, which are hidden on three surrounding islands. Combining all three seals together one can get the key to unclaimed properties of a valuable nature. An important feature of these islands is that they are located at equal distances from each other.
As you probably know, compass of Captain Jack Sparrow does not point north. It points the way to that thing, which a man, holding the compass in his hand, wants the most. Jack drew the straight line on his map, on which, according to compass directions, there should be one of the islands. Jack knows almost nothing about the islands and can't intentionally change his wishes to find out direction to the other two islands. To save time, he passed the compass first to Pintel and then to Ragetti, so each of them after that drew one straight line on their maps respectively.
Jack suggests that each of them most wanted to find different seals. Help him identify the possible location of the islands.

Input

Each of three lines of input contains description of one straight line. Line is given by the coordinates of different points on it: x1, y1, x2, y2. It is guaranteed that the lines are pairwise distinct. All coordinates in the input are integers and do not exceed 1 000 by absolute value.

Output

Output the coordinates of the points, corresponding to the desired islands, one point in a line. i-th point must belong to the i-th straight line from the input data. If there are several options for the location of the islands up for an old legend, you can choose any of them. All coordinates in the output should not exceed 108 by absolute value. The points should be located at a distance of at least 10−6 from each other and no more than 10−6 from their respective lines. Pairwise distances between the points should not differ by more than 10−6. It is guaranteed that at least one suitable variant of location exists.

Samples

inputoutput
0 -1 1 0
0 -1 -1 0
0 -1 0 1
1 0
-1 0
0 1.7320508
3 1 4 1
-2 -1 -4 -1
-4 0 4 0
0 1
0 -1
1.7320508 0
Problem Author: Olga Soboleva
Problem Source: Open Ural FU Championship 2012
To submit the solution for this problem go to the Problem set: 1938. Caribbean Triangle