import sys
from math import gcd

# inf = open('input.txt', 'r')
# reader = (line.rstrip() for line in inf)
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__

X = int(input())
# X = 100000000063

def isqrt(n):
    x = n
    y = (x + 1) >> 1
    while y < x:
        x = y
        y = (x + n // x) >> 1
    return x

f1 = isqrt(X)
while X % f1 > 0 or gcd(X // f1, f1) > 1:
    f1 -= 1
print(f1, X // f1)

# inf.close()
