from math import *
x=int(input())
fac=[]
for i in range(1,int(pow(x,0.5))+1):
    if(x%i==0):
        fac.append(i)
        fac.append(x//i)
res=[float('inf'),float('inf')]
for i in fac:
    y=gcd(i,x//i)
    if(((x//i)*i)//y==x):
        if(min(x//i,i)<=max(res)):
            res=[i,x//i]
print(*res)
