Sequence#6071

Sequence

1 second
64 megabytes
Very easy

The sequence , , , may not look like an arithmetic sequence, but it is one in base . Likewise, the sequence , , is clearly an arithmetic sequence in base , but it is also one in base . For this problem, you will be given a sequence of numbers and you must write an Arithmetic Confirmation Machine to determine the smallest base under which the numbers form an arithmetic sequence.

Input

Input will consist of multiple problem instances. The first line will contain a single integer 2 \le n \le 5 indicating the number of values in the sequence. The next line will contain the numbers in strictly increasing order, separated by a single blank. A value of n = 0 will terminate the input. All numbers will be positive and made up of the digits - exclusively, and no number will have more than digits.

Output

Output for each instance should consist of one line of either the form

Minimum base = .

where is the the smallest base which results in an arithmetic sequence, or you should output

No base <= 10 can be found.

Examples

Example 1

Loading
Loading