A zoo have two types of creatures, type A has a hands and type B has b hands. Spawn the smallest number of creatures so they can grab each other hands in the following conditions:
What is the smallest number of creature needed?
Note: It is guaranteed that under the given conditions answer is unique.
Input format
Output format
The output contains t lines. For each test case, print two numbers ans1i,ans2i, the number of type A creatures, and the number of type B creatures. Consider that ans1i+ans2i should be smallest possible.
Constraints
1≤t≤100 000
1≤ai,bi≤109
At least 1 of each creture types needed.
One creature of type A has 20 hands.
Ten creatures of type B have 20 hands.
So they can grab each other hands in asked conditions.