from math import gcd


def div_list(num):
    div = []
    for i in range(1, 1 + int(num ** 0.5)):
        if num % i == 0:
            div.append(i)
            div.append(num // i)

    return sorted(div)


X = int(input())
d = div_list(X)
l = len(d)

for i, j in zip(range(l // 2 - 1, -1, -1), range(l // 2, l)):
    if gcd(d[i], d[j]) == 1:
        print(d[i], d[j])
        break
