def gcd(a,b):
   while(b):
      a,b=b,a%b
   return a
x=int(input())
BORDER=1000006
a=1
b=x
for i in range(1,BORDER):
   if(x%i==0):
      d1=i
      d2=x//i
      if(gcd(d1,d2)==1):
         if(max(d1,d2)<max(a,b)):
            a=d1
            b=d2
print(a,b)
