There is Chef and Chef’s Crush who are playing a game of numbers.

Chef’s crush has a number $A$ and Chef has a number $B$.

Now, Chef wants Chef’s crush to win the game always, since she is his crush. The game ends when the greatest value of A^B is reached after performing some number of operations (possibly zero), Where ^ is Bitwise XOR.

Before performing any operation you have to ensure that both $A$ and $B$ have the same number of bits without any change in the values. It is not guaranteed that $A$ and $B$ should have same number of bits in the input.
For example, if $A$ is $2$ and $B$ is $15$, then the binary representation of both the numbers will have to be $0010$ and $1111$ respectively, before performing any operation.  
The operation is defined as  : 
- Right circular shift of the bits of only $B$ from MSB$_B$ to LSB$_B$ i.e. if we consider $B_1 B_2 B_3 B_4$ as binary number, then after one circular right shift, it would be $B_4 B_1 B_2 B_3$
They both are busy with themselves, can you find the number of operations to end the game?

-----Input :-----
- The first line of input contains $T$, (number of test cases)  
- Then each of the next $T$ lines contain : two integers $A$ and $B$ respectively.

-----Output :-----
For each test case print two space-separated integers, The number of operations to end the game and value of A^B when the game ends.

-----Constraints :-----
- $1 \leq T \leq100$ 
- $1\leq A,B \leq 10^{18}$

-----Subtasks  :-----
- 30 Points: $1\leq A,B \leq 10^5$
- 70 Points: Original Constraints

-----Sample Input :-----
1
4 5

-----Sample Output :-----
2 7

-----Explanation  :-----
Binary  representation of  $4$ is $100$ and binary  representation  $5$ is $101$.   
- After operation $1$ : $B$ $=$ $110$, so A^B $=$ $2$ 
- After operation $2$ : $B$ $=$ $011$, so A^B $=$ $7$ 
So, the value of A^B will be $7$. Which is the greatest possible value for A^B and the number of operations are $2$.

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = 'def dec(n):  \n return bin(n).replace("0b", "")\ndef ss(str):\n if len(str) <= 1:\n  return str\n mid = str[1:len(str)]\n return mid + str[0]\ndef btd(q):      \n q1 = q \n decimal, i, n = 0, 0, 0\n while(q != 0): \n  dec = q % 10\n  decimal = decimal + dec * (2**i) \n  q= q//10\n  i += 1\n return(decimal) \nt=int(input())\nfor iw in range(0,t):\n a=input()\n arr=[]\n \n we=[]\n x=a.split()\n string=str(dec(int(x[1])))\n string2=str(dec(int(x[0])))\n d=int(x[0])\n if(len(string)>len(string2)):\n  l=len(string)\n else:\n  l=len(string2)\n  for lk in range(0,len(string2)-len(string)):\n   string=\'0\'+string\n for k in range(0,l):\n  c=int(x[1])\n  arr.append(d^c)\n  string=ss(string)\n  x[1]=btd(int(string))\n for h in range(0,len(arr)):\n  if(max(arr)==arr[h]):\n   if(h==0):\n    we.append(0)\n    break\n   else:\n    we.append(len(arr)-h)\n print(min(we),max(arr))'
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: 14165