from math import gcd
x = int(input())
pairs = []
for i in range(1, int(x ** 0.5) + 1):
    if x % i == 0 and gcd(i, x // i) == 1:
        pairs.append([i, x // i])
ind = -1
m = 100000000000000
for i in range(len(pairs)):
    if m > max(pairs[i][0], pairs[i][1]):
        m = max(pairs[i][0], pairs[i][1])
        ind = i
print(*pairs[i])
