n=int(input())
i=1
from math import gcd
l=[1,n];t=n
while i*i<=n:
    if n%i==0 and gcd(i,n//i)==1:
        temp=max(i,n//i)
        if temp<t:
            t=temp
            l=[i,n//i]
        
    i+=1
print(*l)