from math import *
n=int(input())
l=[]
k=sqrt(n)
k=floor(k)
k=k+1
i=2
c=0
while n>0 and i<(k+1):
    if n%i==0:
        n=n//i
        c=c+1
    else:
        l.append(i**c)
        c=0
        i=i+1
x=max(l)
if len(l)==1:
    print(1,x)
else:
    f=1
    for i in range(len(l)):
        if l[i]!=x:
            f=f*l[i]
    print(f,x)
    
            
    
            