TVMATCH
A television channel has acquired the broadcasting rights for the football championship matches. Since they paid a lot of money, the organizing authority allows the channel to determine the format of the championship that will maximize viewership.
After considerable thought, the channel executives settle on the following championship format. The championship starts with teams and consists of rounds. In each round, each team plays once against all other teams, and at the end of the round, the team with the lowest score is eliminated from the championship. After the end of rounds, the champion is the team leading in the overall standings.
The channel plans to broadcast all championship matches. They want the number of matches to be , but they have not specified the desired values of and .
Given , find the values of and so that the total number of matches is equal to . If this is not possible for any combination of and , your program should output the word "IMPOSSIBLE". If it is possible for multiple combinations of and , prefer the one with the highest value of .
Input
The input consists of a single line containing only one natural number, .
Output
The output must consist of a single line containing either the word "IMPOSSIBLE" or a pair of natural numbers and , separated by a single space.
Constraints
Execution time limit: 1 sec.
Memory limit: 64 MB
Examples of Input - Output
1st
STDIN (tvmatch.in)
64
STDOUT (tvmatch.out)
8 3
Explanation of the first Example: If teams start, in the first round there will be matches. In the second round, there will be teams left, and they will play matches. Finally, in the third round, there will be teams left, and they will play matches. The total number of matches is . Note that the same total number of matches can be obtained if teams start and play two rounds .
2nd
STDIN (tvmatch.in)
371
STDOUT (tvmatch.out)
14 6
3d
STDIN (tvmatch.in)
17
STDOUT (tvmatch.out)
IMPOSSIBLE
Comments