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


def lcm(a, b):
    m = a * b
    while a != 0 and b != 0:
        if a > b:
            a %= b
        else:
            b %= a
    return m // (a + b)

for i in range(len(d)):
    if n1>n2 and n2*d[i] != n1:
        n2*=d[i]
    else:
        n1*=d[i]
if lcm(n1,n2)!=m:
    if n1<n2:
        b = Factor (n1)
    else:
        b = Factor (n2)
    while lcm(n1,n2)!=m:
        n1*=b[0]
        n2//=b[0]
        b.pop(0)
print (n1,n2)