import math

x = int(input())
p = math.sqrt(x)
i = 1

minp = 10000000000
if x == 1:
    q1 = 1
    i1 = 1
else:
    while i < p:
        if x % i == 0:
            q = x // i
            if i == 1:
                if minp > max(q, i):
                    q1 = q
                    i1 = i
            elif q % i == 0 or i % q == 0:
                pass
            elif minp > max(q, i):
                q1 = q
                i1 = i
        i += 1
print(q1, i1)
