# cook your dish here
from math import *
n=int(input())
l=[]
k=sqrt(n)
k=floor(k)
k=k+1
m=n
i=2
f,g=1,n
while i<k+1:
    if n%i==0:
        a=gcd(i,n//i)
        s=max(i,n//i)
        if (a==1 and s<m):
            m=s
            f=i
            g=n//i
    i=i+1
print(f,g)

            
    