import math

x = int(input())
resL = -1
resR = -1
res = -1
i = 1
while(i * i <= x):
    if(x%i == 0):
        a = i 
        b = x//i
        if((a * b / math.gcd(a, b)) == x):
            if(res == -1 or max(a, b) < res):
                resL = a
                resR = b
                res = max(a, b)
    i += 1

print(resL, resR)
