Problem A: Bits and Pieces

Let A and B be non-negative integers and let C = A&B and D = A|B. Given C and D, can you find A and B such that the absolute difference (|A-B|) is minimal?

(A&B and A|B are bitwise AND and OR respectively, represented with symbols & and | in the programming languages used in this contest)

Input Format

The input starts with an integer T - the number of test cases (T <= 100). T cases follow on each subsequent line, each of them containing integers C and D (0 <= C,D < 2^31).

Output Format

For each test case, print integers A and B on a line such that A&B=C, A|B=D, A<=B and B-A is minimal. If there are no such A and B, print -1 on the line instead.

Sample Input

2 3
3 2
3 15

Sample Output

2 3
7 11

Darko Aleksic
ACPC 2011