The Magical 3#7544

The Magical 3

1 second
122.174 megabytes
Very easy

There's no doubt about it, three is a magical number. Two's company, but three's a crowd, no one ever talks about blind mice, and there are three members in an ACM ICPC team.

Even more magically, almost all integers can be represented as a number that ends in in some numeric base, sometimes in more than one way. Consider the number , which is represented as in base and in base . For this problem, you will find the smallest base for a given number so that the number's representation in that base ends in .

Input

Each line contains one nonnegative integer . The value n = 0 represents the end of the input and should not be processed. All input integers are less than 2^{31}. There are no more than nonzero values of .

Output

For each nonzero value of print on a single line the smallest base for which the number has a representation that ends in . If there is no such base, print instead "No such base".

Examples

Example 1

Loading
Loading