import math

X = int(input())

lim = int(math.sqrt(X))

a = 1
b = X

for i in range(1, lim + 1):
    if(X % i == 0):
        j = X // i
        if(i != j):
            a = i
            b = j
            
print(str(a) + " " + str(b))
    