m = int(input())
def Factor(n):
   Ans = []
   d = 2
   while d * d <= n:
       if n % d == 0:
           Ans.append(d)
           n //= d
       else:
           d += 1
   if n > 1:
       Ans.append(n)
   return Ans
d = Factor(m)
n1 = 1
n2 = 1
for i in range(len(d)):
    if n1>n2 and n2*d[i] != n1:
        n2*=d[i]
    else:
        n1*=d[i]
print (n1,n2)