def gcd(n,m):
    if (m==0):
        return n
    else:
        return gcd(m,n%m)

def pairs(n):
    i= int(n**0.5)
    while(i>=1):
        if (n%i==0) and (gcd(i,n/i)==1):
            print(i,n//i)
            break
            
                
        i=i-1
        
   
t = int(input())
 
pairs(t)
 
