import math

n = int(input())
a = b = 10**12
for i in range(1, int(math.sqrt(n) + 1)) :
    if n % i == 0 :    
        temp = int(n / i)
        if n / math.gcd(i, temp) == n and max(i, temp) < max(a, b):
            a = i
            b = temp
print(a, b)