import math
n=int(input())
k=n
if n==2:
    print(1,2)
elif n==1:
    print(1,1)
else:
    x=[]
    
    for i in range(2,int(math.sqrt(n))+1):
        if n%i==0:
            s=n//i
            if (i*s)//math.gcd(i,s)==n:
                k=max(i,s)
    
    '''y=len(x)
    c=x[y-1]
    v=x[y-2]
    if max(c,n//c)>max(v,n//v):
        k=v
    else:
        k=c
    h=min(c,v)
    '''
    
    print(k,n//k)
                   
            
