eolymp
bolt
Try our new interface for solving problems
Problems

Global Positioning System

Global Positioning System

Recently in Flatland it was decided to create the Newest Global Positioning System. Since the country occupies an infinitely large portion of the plane, the output of the satellites is very difficult, so it was decided to confine ourselves to the ground-based positioning method.

To this end, three radio towers were built in Flatland, not on the same straight line. An object that wants to know its location sends a signal to the towers. By the strength of the signal, reaching the towers, the distance between the towers and the object is determined.

prb8528.gif

Write a program that implements the last component of the system, which, by obtaining the coordinates of the towers and the distance from the object to each of them, finds the coordinates of the object.

Input

First line contains three pairs of numbers x1, y1, x2, y2, x3 and y3 - the tower coordinates. Second line contains three non-negative numbers - the distances to corresponding towers. All input numbers are integers and do not exceed 50 by absolute value.

Output

If there is no such location for the object, that the distances to the towers correspond the data, then output single word "Impossible". Otherwise output two numbers - the coordinates of the object with an accuracy of six decimal places.

Time limit 1 second
Memory limit 128 MiB
Input example #1
0 4 2 6 5 0
2 2 5
Output example #1
2.0 4.0
Input example #2
0 0 0 3 1 -4
4 5 5
Output example #2
4.0 0.0
Input example #3
0 0 1 0 0 1
2 2 2
Output example #3
Impossible
Source 2009 Цикл интернет-олимпиад для школьников. Первая олимпиада, базовый уровень, September 19, Problem E