Schoolboy Vasylko enjoys numbers that end with his lucky digit . Whenever he encounters a natural number , he tries to find a base (d \ge 2) such that the representation of in base ends with as many consecutive digits as possible.
Write a program that, given numbers and , finds such a base that the representation of in base ends with the maximum possible number of consecutive digits .
The input contains two decimal integers and (1 \le n \le 10^{11}; 0 \le k \le 9).
Output two numbers: — the found base, and — the number of consecutive digits at the end of the representation of in this base. If there are several such , output the smallest one.
Example 1