from math import gcd
x = int(input())
i = 1
res1 = 1
res2 = x
M = x
while i*i <= x:
        if x % i == 0:
                j = x // i
                if (i*j)/gcd(i,j) == x:
                        if max(i,j) < x:
                                res1 = i
                                res2 = j
        i+=1
print(res1, res2)
