Hide

Problem D
Meet Me in the Middle

Languages en is

Two voters’ ideal policies can be represented by points in the plane (x1,y1) and (x2,y2). They each have a level of flexibility r1 and r2, representing how far a policy can be from their ideal policy such that they are still happy, instead of unhappy. We say those policies are in the voter’s range of approval. Many different distance metrics may be used, but we will use Euclidean distance here.

These two voters want to find common ground where they agree. This common ground can take different shapes depending on where their ideal policy is located in the plane and how unhappy they are with the current state of affairs. The first voter is us and the second voter is them.

  1. We cannot agree with them on anything, so it is impossible.

  2. They are happy with any policy within our range of approval.

  3. We are happy with any policy within their range of approval.

  4. We can only agree with them on a single policy as a compromise.

  5. We have many policies within our range of approval and their range of approval to choose from as potential compromises. This compromise range can be represented by the two points at which the edges of the ranges of approval intersect.

Note that the second and third case overlap slightly, when both voters have the exact same opinion.

Input

The first line contains three integers x1,y1,r1, representing our ideal policy and our level of flexibility. The second line contains three integers x2,y2,r2 representing their ideal policy and their level of flexibility.

All coordinates are between 106 and 106, inclusive. All radii are between 1 and 2106, inclusive. You may assume all voters are unique.

Output

Depending on which shape of common ground we have, output

  1. impossible

  2. our

  3. their

  4. compromise and two numbers x,y representing the unique compromise policy.

  5. compromises and four numbers xa,ya,xb,yb representing the policies at which the edges of the ranges of approvals intersect. Output the policies in lexicographical order.

Your output is considered correct if it has at most a relative error of 106.

Sample Input 1 Sample Output 1
2 2 4
7 6 2
impossible
Sample Input 2 Sample Output 2
5 4 10
9 7 5
their
Sample Input 3 Sample Output 3
5 5 1
-4 -7 20
our
Sample Input 4 Sample Output 4
0 0 5
16 12 15
compromise
4.0000000000000000 3.0000000000000000
Sample Input 5 Sample Output 5
-1 -1 2
1 1 2
compromises
-1.0 1.0
1.0 -1.0
Sample Input 6 Sample Output 6
-5 2 4
-2 4 6
compromises
-7.960164396867 4.690246595300
-3.655220218518 -1.767169672223
Hide

Please log in to submit a solution to this problem

Log in