from math import sqrt
#l=list(map(int,I().split()))
import sys
input=sys.stdin.readline
I=input
n=int(input())
nn=n
pf=[1]
if(n%2==0):
    pf.append(2)
sn=int(sqrt(n))+1
while n%2==0:
    n=n//2
for i in range(3,sn,2):
    if(n%i==0):
        pf.append(i)
        while n%i==0:
            n=n//i 
if(n!=1):
    pf.append(n)
#print(pf)
i=0
j=len(pf)-1
p1=pf[i]
p2=pf[j]
while j-i>1:
    if(p1*(pf[i+1])<=(p2*pf[j-1])):
        p1=p1*(pf[i+1])
        i+=1
    else:
        p2=p2*pf[j-1]
        j-=1
if(p1*p2!=n):
    mul=nn//(p1*p2)
    p2=p2*mul
if(p1>p2):
    p1,p2=p2,p1
print(p1,p2)

