Factors#5653

Factors

2 seconds
256 megabytes
Very easy

One of the fundamental theorems of arithmetic states that any integer greater than can be uniquely factored into a product of prime numbers. However, this set of prime factors can be arranged in different ways. For example:

Let denote the number of distinct ways to permute the prime factors of . Then f(10) = 2 and f(20) = 3.

You are given a positive integer . It is guaranteed that for every there exists some such that f(k) = n. Your task is to determine the minimal value of with this property.

Input

The input contains at most test cases. Each test case is given on a separate line and consists of a single positive integer n~(n < 2^{63}).

Output

For each test case, output two numbers: and the smallest k > 1 such that f(k) = n. The test cases are chosen in such a way that the condition k < 2^{63} always holds.

Examples

Example 1

Loading
Loading