Consider the following example. Two mixtures of Algolene, Basicine and Cobolase are available, in ratios of 1:2:3 and 3:7:1, respectively. By mixing these solutions in a ratio of 1:2 we obtain a solution of A, B, C with ratio 7:16:5. But there is no way to combine these mixtures into a new one with ratio 3:4:5. If we additionally had a solution of ratio 2:1:2, then a 3:4:5 mixture would be possible by combining eight parts of 1:2:3, one part of 3:7:1 and five parts of 2:1:2.
Determining which mixing ratios we can obtain from a given set of soluti ons is no trivial task. But, as the ACM has shown, it is possibly a very profitable one. You must write a program to find mixing ratios.
Finally, there is one line containing three non-negative integers a, b, c, which specify the ratio a : b : c in the desired solution. At least one of these integers is positive.
The input file is terminated with the integer 0 on a line by itself foll owing the last test case.
"Mixture"
, followed
by the ordinal number of the test case. On the next line, if it is
possible to obtain the desired solution by mixing the input solutions,
output the word "Possible"
. Otherwise, output the word
"Impossible"
.
2 1 2 3 3 7 1 3 4 5 3 1 2 3 3 7 1 2 1 2 3 4 5 0
Mixture 1 Impossible Mixture 2 Possible