# HEY STALKER
import math
ans = []


def printDivisors(n):
    i = 1
    while i <= math.sqrt(n):

        if n % i == 0:
            if n / i == i:
                ans.append(i)
            else:
                ans.append(i)
                ans.append(n // i)
        i = i + 1


q = int(input())
printDivisors(q)
ans.sort()
a = 2e18
b = 2e18
# print(*ans)
for t in ans:
    if math.gcd(t, q // t) == 1:
        if max(t, q // t) < max(a, b):
            a = t
            b = q // t
print(a, b)