import math


def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


m = 1e12
x = int(input())
target = int(math.sqrt(x)) + 1
for i in range(1, target):
    if x%i != 0:
        continue
    d1 = x // i
    a1 = gcd(i, d1)
    if a1 == 1 or a1 == x:
        if min(i, d1) < m:
            m = max(i, d1)
            ans = [i, d1]
print(*ans)