- Time limit: 2.00 s
- Memory limit: 256 MB
A fixed point for a function is a value such that .
In this task we focus on the following function:
The operator is the xor operator (written ^
in C++/Java).
Given and , can you find a fixed point for the function?
Input
The first input line contains an integer : the number of test cases.
After this, there are lines that describe the test cases. Each line contains two integers and .
All test cases have been generated so that and have been chosen uniformly randomly from the range .
Output
For each case, output a number that is a fixed point for the function, or "-" if no such number exists.
If there are several possible solutions, you can output any of them.
Constraints
Example
Input:
3 2 5 1 1 0 7
Output:
3 - 7
For example, in the first test case, .