Alice (uniformly and independently) randomly picks two integers
from the range , and writes down the values of , , and (integer division) in some random order. Unfortunately, she forgot the values of and . You need to help her to find out if there exists two integers such that and , , ,are the numbers she has written down.
If a solution exists, it is guaranteed to be unique.
Input Format
- The first line of input contains a single integer
- will be negative.
Output Format
- For each testcase, output in a single line, separated by a space, the two numbers Alice has chosen in order (i.e, if the solution is
- twice, separated by a space, instead.
Constraints
- is negative.
Subtasks
Subtask #1 (100 points): Original constraints
Sample Input 1
2
-1 72 0 17
1 4 5 6
Sample Output 1
8 9
-1 -1
Explanation
Test case
: With we obtain which are exactly thenumbers written down by Alice.
Test case
: It can be shown that no choice of integers can produce the given numbers.
ConversionConversion EmoticonEmoticon