n = int(input())
import math

ma = float('inf')
aa = bb = 0

for i in range(1, int(math.sqrt(n))+1):
    if n%i==0 and n/math.gcd(i, n//i)==n:
        a = i
        b = n//i
        if max(a, b)<ma:
            aa, bb = a, b
            ma = max(a, b)

print(aa, bb)