In 1932, Lothar Collatz formulated a seemingly simple problem that has not been solved yet. Suppose we have some number $$$ n $$$, then if it is even, we divide it by $$$2$$$, and if it is odd - multiply it by $$$3$$$ and add one. Let's call this transformation a Collatz step. The hypothesis, which has not been proven, states that after a certain number of steps, any integer turns into one. For all numbers up to $$$ 10^{22} $$$, it is proved to be true.
Denote by $$$ t(n) $$$ the number of steps necessary for the number $$$ n $$$ to turn into one, and write down the consecutive values $$$ t(1), t(2), t(3), \dots $$$: $$$ 0, 1, 7, 2, 5, 8, 16, 3, 19, 6, 14, 9, 9, 17, 17, 4, 12, 20, 20, \dots $$$
Analyzing the given sequence, you can find that it very often contains pairs of identical values, so that $$$ t(i) = t(i + 1) $$$. According to some estimates, up to half of the sequence elements form such pairs. There are also longer segments of repeating values, for example, the first triple occurs already at $$$28$$$-th place $$$ t(28) = t(29) = t(30) = 18 $$$.
Write a program that, on an interval of length $$$ w $$$, starting with the element $$$ s $$$, finds the longest segment of the same values $$$ t() $$$. If there are several such segments, then you need to find the leftmost of them (with the minimum first element). Elements falling outside the range $$$ [s, s + w - 1] $$$ are not taken into account.
A single line contains two integers $$$ s $$$ ($$$ 1 \leq s \leq 10^{10} $$$) and $$$ w $$$ ($$$ 1 \leq w \leq 10^6 $$$) separated by a space.
In a single line print two integers separated by a space: $$$ l $$$ is the length of the segment, $$$ x $$$ is its beginning. The segment $$$ [x, x + l - 1] $$$ must belong entirely to the interval $$$ [s, s + w - 1] $$$.
1 50
3 28
On a segment of $$$50$$$ numbers starting with $$$1$$$, there are 6 pairs: $$$ t(12) = t(13) $$$, $$$ t(14) = t(15) $$$, $$$ t(18) = t(19) $$$, $$$ t(20) = t(21) $$$, $$$ t(22) = t(23) $$$, $$$ t(34) = t(35) $$$ and $$$3$$$ triples: $$$ t(28) = t(29) = t(30) $$$, $$$ t(36) = t(37) = t(38) $$$, $$$ t(44) = t(45) = t(46) $$$. From the triple $$$ t(49) = t(50) = t(51) $$$, only $$$2$$$ values fall into the interval, forming a "virtual" pair $$$ t(49) = t(50) $$$. The leftmost of the triples is the triple that starts at $$$ 28 $$$.
| Name |
|---|


