import math

n, Min = int(input()), 10000000000000000000000000000000
luu = [0, 0]

for i in range(1, int(n**0.5)+1):
    if n%i == 0 and (i*(n//i))//math.gcd(i, n//i) == n and Min > max(i, n//i):
        luu = [i, n//i]
print(luu[0], luu[1])


