Nychypir 2#1003

Nychypir 2

1 second
64 megabytes
Easy

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.

Input

The only line of input contains two numbers and (1 \leq y < x \leq 1\,000\,000), separated by a space.

Output

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.

Examples

Example 1

Loading
Loading