Figure skating#744

Figure skating

1 second
64 megabytes
Easy

The top figure skater's defeat led to a heated debate over the revised scoring system. Experts remarked that the jump elements were severely undervalued, while secondary elements received excessively high scores. Consequently, another skater, flawlessly performing a less challenging program, won the championship. Perhaps the issue lies in the numeral system used for scoring. If there existed a numeral system in which the score is expressed with exactly digits, everything might have turned out differently!

Input

A single line contains two integers and (1 \leq N, K \leq 10^9), given in the decimal numeral system.

Output

Output a single number: the base of the numeral system (in decimal) in which has exactly digits. If multiple numeral systems are possible, output the smallest one. If there is no positional numeral system that satisfies the condition, output No solution.

Examples

Example 1

Loading
Loading