import math


def grt(x, y):
    while y:
        x, y = y, x % y
    return x


n = int(input())
a, b = 1, n
for i in range(1, int(math.sqrt(n)) + 1):
    if n % i == 0 and max(a, b) > max(i, n // i) and a * b // grt(i, n // i) == n:
        a, b = i, n // i
print(a, b)