def gcd(a, b):
   if a==0:
      return b
   return gcd(b%a, a) 
def lcm(a, b):
   return (a*b)/gcd(a,b)
def max(a, b):
   if a==b:
      return a
   if a<b:
      return b
   if a>b:
      return a
   
n=int(input()) 
l=[]
d=[1,n]
for i in range(1,n+1):
   if n%i==0:
      l.append(i)
mut=n
for i in range(1,n+1):
   for j in range(1,n+1):
      if lcm(i,j)==n:
         if max(i,j)<n:
            mut=max(i,j) 
            d=[i,j]
        
s=str(d[0])+' '+str(d[1]) 
print(s) 
                 
        