import math 
  
# A function to print all prime factors of  
# a given number n 
def primeFactors(n): 
    l = []
    # Print the number of two's that divide n 
    while n % 2 == 0: 
        l.append(2)
        n = n//2
          
    # n must be odd at this point 
    # so a skip of 2 ( i = i + 2) can be used 
    for i in range(3,int(math.sqrt(n))+1,2): 
          
        # while i divides n , print i ad divide n 
        while n % i== 0: 
            n = n//i
            l.append(i)
    # Condition if n is a prime 
    # number greater than 2 
    if n > 2: 
        l.append(n)
        
    return l
n = int(input())    
from collections import defaultdict
dic = defaultdict(lambda:0)
for i in primeFactors(n):
    dic[i]+=1
dic[1]+=1
m = 100000000000000000000000000000
for i in dic.keys():
    m = min(m,max(i**dic[i],n//(i**dic[i])))
print(m,n//m)
    