CF BUDDY
← Problems·

1285C · Fadi and LCM

1400 · brute force, math, number theory

Problem: Today, Osama gave Fadi an integer XX, and Fadi was wondering about the minimum possible value of max(a,b)max(a, b) such that LCM(a,b)LCM(a, b) equals XX. Both aa and bb should be positive integers.

LCM(a,b)LCM(a, b) is the smallest positive integer that is divisible by both aa and bb. For example, LCM(6,8)=24LCM(6, 8) = 24, LCM(4,12)=12LCM(4, 12) = 12, LCM(2,3)=6LCM(2, 3) = 6.

Of course, Fadi immediately knew the answer. Can you be just like Fadi and find any such pair?

Input Format: The first and only line contains an integer XX (1X10121 \le X \le 10^{12}).

Output Format: Print two positive integers, aa and bb, such that the value of max(a,b)max(a, b) is minimum possible and LCM(a,b)LCM(a, b) equals XX. If there are several possible such pairs, you can print any.

Sample Cases

Case 1

Input

2

Output

1 2

Case 2

Input

6

Output

2 3

Case 3

Input

4

Output

1 4

Case 4

Input

1

Output

1 1

Similar problems

00:00:00
Loading editor…
Welcome! I'm your coding tutor for this problem. Use the chips below to reveal stored hints or get AI feedback on your code. I'll guide you step by step — never giving away the solution.

Sign in to unlock AI tutor feedback