You are given two non-negative integers x, y. Find two non-negative integers p and q such that p&q=0, and ∣x−p∣+∣y−q∣ is minimized. Here, & denotes the bitwise AND operation.
Input
Each test contains multiple test cases. The first line contains the number of test cases t (1≤t≤104). The description of the test cases follows.
The only line of each test case contains two non-negative integers x and y (0≤x,y<230).
Output
For each test case, output two non-negative integers p and q you found. If there are multiple pairs of p and q satisfying the conditions, you may output any of them.
It can be proven that under the constraints of the problem, any valid solution satisfies max(p,q)<231.
1 2 3 4 5 6 7 8
7 00 11 36 711 44 123321 10737418231073741822
1 2 3 4 5 6 7
00 21 38 69 43 128321 10737418241073741822
Note
In the first test case, one valid pair would be p=0 and q=0, as 0&0=0 and ∣x−p∣+∣y−q∣=∣0−0∣+∣0−0∣=0 is the minimum over all pairs of p and q.
In the third test case, one valid pair would be p=3 and q=8, as 3&8=0 and ∣x−p∣+∣y−q∣=∣3−3∣+∣8−6∣=2 is the minimum over all pairs of p and q. Note that (p,q)=(3,4) is also a valid pair.