You need to find an arithmetic progression of natural numbers a_1, a_2, \ldots, a_n with a common difference , such that a_k^2 + 1 is a prime number for every k = 1, 2, \ldots, n. Among all such progressions, choose the one with the greatest number of elements.
The common difference of the progression means that for every k = 2, 3, \ldots, n the equality a_k - a_{k-1} = d holds.
The input consists of several test cases. Each line contains a single integer — the common difference of the progression (1 \leq d \leq 9999). The digit does not appear in the decimal representation of . All numbers in the input are distinct.
For each test case, output a single line with two numbers. The first number is the maximum length of the arithmetic progression. The second number is its first element. Among all progressions with the maximum length, choose the one with the smallest first element.
Example 1