
n = int(input())

from math import gcd

ans = (99999999999999,9999999999999)
for i in range(1,1000005):
    c = n//i
    if (c*i)//gcd(c,i)==n:
        if max(i,c) < max(ans):
            ans = (i,c)
print(ans[0], ans[1])


