Bit automaton
Ralph found a new weapon - a bit machine! This automaton fires bursts of bits, with the first bit fired dealing 1 damage to the target, and each successive bit dealing twice as much damage to the target as the previous one.
This machine came in handy when Ralph was suddenly attacked by a horde of cyber-bugs. While shooting at the bug, Ralph notices which bits hit the target and which didn't. Unfortunately, over the years of hard work, our hero has pretty much ruined his eyesight, and therefore he can recognize the trajectory of one of the bits incorrectly. In this regard, the actual and noticed by Ralph damage may differ. Knowing the number of bits fired and the estimated damage, help Ralph find out what the minimum and maximum real damage could be inflicted on the cyberbug.
Input
The first line contains two numbers n and a (1 ≤ n ≤ 63, 0 ≤ a ≤ 2 ^n
- 1) - the number of bits in the code and the expected damage, respectively.
Output
Print two numbers: the minimum and maximum possible real damage, given that Ralph could make a mistake in recognizing the result of a shot in no more than one bit. It is known that 0 ≤ a[min]
≤ a[max]
≤ 2^n
- 1.