n=int(input())
i=2
l=[]
a=n
while n>1:
    c=0
    while n%i==0:
        c+=1
        n=n//i
    l.append(i**c)
    i+=1
l.append(1)
holder=[1,a]
p=len(l)
for i in range(p):
    for j in range(i+1,p):
        l2=[l[i]*l[j],]
        l2.append(a//l2[0])
        if max(l2)<max(holder):
            holder=l2
print(*holder)