def gcd(a, b):
    a, b = (a, b) if a > b else (b, a)
    while b != 0:
        b, a = a % b, b
    return a


def my_fun(x):
    for i in range(int(x**0.5), 0, -1):
        if x % i == 0:
            if gcd(i, x//i) == 1:
                return (i, x//i)
    return (1, x)


x = int(input())
print(*my_fun(x))