import math


def max12(max1: int, max2: int):
    if max1 > max2:
        return max1
    return max2


mimalnoe = 10000000099999
x = int(input())
p = math.sqrt(x)
i = 1
if x == 1:
    q1 = 1
    i1 = 1
else:
    while i < p:
        if x % i == 0:
            q = x // i
            if mimalnoe > max12(q, i):
                mimalnoe = max12(q, i)
                q1 = q
                i1 = i
        i += 1


print(q1, i1)
