def gcd(a,b):
    # Everything divides 0  
    if (b == 0): 
         return a 
    return gcd(b, a%b)

n = int(input())
a = 1
g = gcd(1,n)
for i in range(1,int(n**0.5) + 1):
    if(n%i==0):
        if(gcd(i,n//i)<=g):
            a = i
print(min(a,n//a),max(a,n//a))