D. Bits Reverse
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Now given two integers $$$x$$$ and $$$y$$$, you can reverse every consecutive three bits in arbitrary number's binary form (any leading zero can be taken into account) using one coin. Reversing $$$(1, 2, 3)$$$ means changing it into $$$(3, 2, 1)$$$.

Could you please find a way that minimize number of coins so that $$$x = y$$$? If you can, just output the minimum coins you need to use.

Input

The first line of input file contains only one integer $$$T$$$ ($$$1\le T\le 10000$$$) indicating number of test cases.

Then there are $$$T$$$ lines followed, with each line representing one test case.

For each case, there are two integers $$$x$$$, $$$y$$$ ($$$0\le x, y \le 10^{18}$$$) described above.

Output

Please output $$$T$$$ lines exactly.

For each line, output Case $$$d$$$: ($$$d$$$ represents the order of the test case) first. Then output the answer in the same line. If there is no way for that, print -1 instead.

Example
Input
3
0 3
3 6
6 9
Output
Case 1: -1
Case 2: 1
Case 3: 2
Note
  • Sample 1: Considering following two binary string:

    $$$0$$$: $$$0\cdots0000$$$

    $$$3$$$: $$$0\cdots0011$$$

    There is no way to achieve the goal.

  • Sample 2: Considering following two binary string:

    $$$3$$$: $$$0\cdots0011$$$

    $$$6$$$: $$$0\cdots0110$$$

    You can reverse the lowest three digits in $$$3$$$ so that $$$3$$$ is changed into $$$6$$$.

    You just need to perform one reverse so that the minimum coin you need to use is $$$1$$$.