
def factors(n):
    primfac = []
    d = 2
    while d*d <= n:
        while (n % d) == 0:
            primfac.append(d)  
            n //= d
        d += 1
    if n > 1:
       primfac.append(n)
    return primfac
from math import gcd 

t = int(input())
m = t
a = list(factors(t))
p = 1
q = t
b = a
c = a[::-1]
for i in range(1,len(a)):
    b[i] = b[i]*b[i-1]

for i in range(1,len(a)):
    c[i] = c[i]*c[i-1]
c =c[::-1]

for i in range(len(a)-1):
    if max(b[i],c[i+1]) < m and b[i]!=c[i+1]:
        m = max(b[i],c[i+1])
        p = b[i]
        q = c[i+1]
print(p,q)
