def gcd(a, b):
    while a:
        a, b = b % a, a
    return b

n = int(input())
for i in range(int(n ** 0.5) + 1, 0, -1):
    if n % i == 0:
        if (gcd(i, n // i) == 1):
            print(i, n // i)
            break