Let f(x) be the greatest even divisor of x or 0, if there is no such divisor.
You are given n queries li, ri. For each of them you have to find
.
The first line contains one integer n (1 ≤ n ≤ 105) — the number of queries.
Each line of n subsequent lines contains two space-separated integers li and ri (1 ≤ li ≤ ri ≤ 105) — the description of i-th request.
Print n integers. On i-th line print one integer — the answer for the i-th query.
1
2 12
42
2
1 42
42 45
462
86