from math import sqrt


def nok(a, b):
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    if a + b == 1:
        return True
    return False


x = int(input())

x1 = int(sqrt(x))

while x != 1:
    if x % x1 == 0 and x1 ** 2 != x and nok(x1, x // x1):
        break
    x1 -= 1
p = x // x1
print(x1, p)



