# cook your dish here
from math import *
n=int(input())
l=[]
k=sqrt(n)
k=floor(k)
k=k+1
i=2
c=0
while n>1 and i<k+1:
    if n%i==0:
        n=n//i
        c=c+1
        if n==1:
            y=i**c
            l.append(y)
    else:
        if c>0:
            y=i**c
            l.append(y)
        c=0
        i=i+1
if n>1:
    l.append(n)
print(l)
x=max(l)
if len(l)==1:
    print(1,x)
else:
    f,g=1,1
    l.sort()
    while len(l)>0:
        if f<g:
            f=f*l[0]
            l.remove(l[0])
        else:
            l.reverse()
            g=g*l[0]
            l.remove(l[0])
            l.reverse()
    print(f,g)
    
            

                