Problem A
Elementary Math

Ellen has already chosen the
Please help Ellen finish constructing the exam by automating this task.
Input
The input consists of:
-
one line with one integer
( ), the number of pairs of numbers; -
lines each with two integers and ( ), a pair of numbers used.
Output
For each pair of numbers
If there are multiple valid answers you may output any of them. If there is no valid answer, output a single line with the string “impossible” instead.
Sample Input 1 | Sample Output 1 |
---|---|
4 1 5 3 3 4 5 -1 -6 |
1 + 5 = 6 3 * 3 = 9 4 - 5 = -1 -1 - -6 = 5 |
Sample Input 2 | Sample Output 2 |
---|---|
4 -4 2 -4 2 -4 2 -4 2 |
impossible |