Alan and Barbara suddenly felt like playing with numbers. Alan chooses a
non-empty subset from the set of first
Alan believes in a magic ratio, which is
Can you help Alan to choose a subset that can achieve the desired ratio?
The first line of the input gives the number of test cases,
Each test case has a single line containing three integers,
For each test case, output the first line containing
Case #x: y
, where POSSIBLE
, if Alan can choose such a non-empty
subset, and IMPOSSIBLE
otherwise.
If you print POSSIBLE
, then output two more lines for that test case.
In the second line, print a single integer, which denotes the size of Alan's
subset.
In the third line, print the integers present in Alan's subset.
If there are multiple solutions, you can print any of them.
Time limit: 5 seconds.
Memory limit: 1 GB.
In the first test case, Alan chooses {2}. Then Barbara gets {1,3}, which sums
up to
In the second test case, Alan chooses {1,2}, which sums up to
In the third test case, it is not possible for Alan to choose a subset that satisfies the condition.