import math
def gcd(a,b):
    if(b==0):
        return a
    return gcd(b,a%b)
x = int(input())
a = int(math.sqrt(x))
ans =[]
a1=[]
b1=[]
for i in range(1,a+1):
    if(x%i==0):
        a = i;
        b = x//i
        if(gcd(b,a)==1):
            ans.append(max(a,b))
            a1.append(a)
            b1.append(b)
print(a1[ans.index(min(ans))],end = " ")
print(b1[ans.index(min(ans))],end = " ")
print()

        
    
    
