#D5549. Prime Number II

    ID: 4610 Type: Default 1000ms 134MiB

Prime Number II

Prime Number II

A prime number is an integer that is greater than 1 and can only be divided by itself or 1. For example, 2 is a prime number because it is divisible only by 2 and 1, but 12 is not a prime number because it is divisible by 2, 3, 4, 6 in addition to 12 and 1.

When you enter the integer n, write a program that outputs the largest prime number less than n and the smallest prime number greater than n.

Input

Given multiple datasets. Each dataset is given n (3 ≤ n ≤ 50,000) on one row.

The number of datasets does not exceed 50.

Output

For each dataset, output the largest prime number less than n and the smallest prime number greater than n on one line, separated by a space.

Example

Input

19 3517

Output

17 23 3511 3527

inputFormat

outputFormat

outputs the largest prime number less than n and the smallest prime number greater than n.

Input

Given multiple datasets. Each dataset is given n (3 ≤ n ≤ 50,000) on one row.

The number of datasets does not exceed 50.

Output

For each dataset, output the largest prime number less than n and the smallest prime number greater than n on one line, separated by a space.

Example

Input

19 3517

Output

17 23 3511 3527

样例

19
3517
17 23

3511 3527

</p>