PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000072. Fadi và bội chung nhỏ nhất (Fadi and LCM)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Fadi và bội chung nhỏ nhất (Fadi and LCM)

Fadi and LCM

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Fadi is given a positive integer XX. Choose positive integers a,ba,b with least common multiple exactly XX. Among all such pairs, minimize max⁡(a,b)\max(a,b). If several optimal pairs exist, output any of them.

Input

One integer XX.

Output

Print two positive integers aa and bb having LCM XX and the minimum possible value of max⁡(a,b)\max(a,b).

Subtasks

  • Subtask 1 (20 points): 1≤X≤1041\le X\le10^4.

  • Subtask 2 (30 points): 1≤X≤1081\le X\le10^8.

  • Subtask 3 (50 points): 1≤X≤10121\le X\le10^{12}.

Examples

Input

6

Output

2 3

Explanation

lcm⁡(2,3)=6\operatorname{lcm}(2,3)=6 and max⁡(2,3)=3\max(2,3)=3. Two numbers both at most 22 cannot have LCM 66, so the pair is optimal.