from math import gcd
x = int(input())
i = 1
min = 1000000000000
while i ** 2 <= x:
    if x % i == 0:
        a = i
        b = x // i
        if a * b // gcd(a,b) == x:
            if max(a,b) < min:
                min = max(a,b)
    i += 1
print(min, x// min)
            

