import math    

def hcf(a,b):
    if a%b==0:
        return b
    else:
        return hcf(b,a%b)

def printDivisors(n) : 
      
    i = 1
    a=[]
    while i <= math.sqrt(n): 
          
        if (n % i == 0) :
                if hcf(i,n//i)==1:
                    a.append([i,n//i])
        
        i = i + 1
        
    return a

a=int(input())
b=printDivisors(a)
c=[]
for i in range(len(b)):
    c.append(max(b[i]))
print(*b[c.index(min(c))])