Problem D
Meet Me in the Middle
Languages
en
is
Two voters’ ideal policies can be represented by points in
the plane
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.
-
We cannot agree with them on anything, so it is impossible.
-
They are happy with any policy within our range of approval.
-
We are happy with any policy within their range of approval.
-
We can only agree with them on a single policy as a compromise.
-
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
All coordinates are between
Output
Depending on which shape of common ground we have, output
-
impossible
-
our
-
their
-
compromise and two numbers
representing the unique compromise policy. -
compromises and four numbers
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
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 |