Nychypir has a number . He does not need it; instead, he needs a number . Nychypir tries to obtain the required number by erasing some digits from . However, he may need to choose an appropriate number system so that this is possible.
The only line of input contains two numbers and (1 \leq y < x \leq 1\,000\,000), separated by a space.
The only line of output should contain either the message No solution (without quotes), if there is no valid base, or a natural number not less than , which is the answer to the problem.
Example 1