n = int(input())
import math
a = 0
b = float('inf')
for i in range(1, int(math.sqrt(n)+1)):
    if n%i==0:
        bb = n//i
        if i*bb/math.gcd(i, bb)==n and abs(bb-i)<abs(a-b):
            a = i
            b = bb

print(a, b)