import math 

def pp(a,b):
    if(a<b):
        print(a,b) 
    else:
        print(b,a) 

n = int(input())

li = []

for i in range(1,int(math.sqrt(n))+1):
    if(n%i == 0):
        a = n//i 
        if(a == i):
            li.append(a) 
        else:
            li.append(a) 
            li.append(i) 
li.sort() 
s = set() 

for i in li:
    s.add(i) 
    a = n//i 
    if(a in s):
        pp(a,i) 
        break 
