def fuc(x):
    arr = [0 for i in range(1000001)]
    for i in range(2, int(x ** 0.5) + 5):
        while x % i == 0:
            x //= i
            arr[i] += 1
    return arr

n = int(input())
if n == 2:
    print(1, 2)
    exit()
arr = fuc(n)
ar = []
for i in range(len(arr)):
    if arr[i]:
        ar.append(i ** arr[i])
ar.sort()
a = 1
b = 1
for i in range(len(ar) - 1, -1, -1):
    if a < b:
        a *= ar[i]
    else:
        b *= ar[i]
print(a, b)