import math
def gcd(x, y): 
  
   while(y): 
       x, y = y, x % y 
  
   return x 
n=int(input())
value=math.ceil(n**0.5)
for i in range (1,value) :
    if n%i==0 :
        x = i 
        y = n//i
        z= gcd(x,y)
        if  z == 1 :
            xx = x 
            yy = y
if n==1 :
    print(1,1)
else:
    print(xx,yy)
