from itertools import combinations
def lcm(x, y):
   if x > y:
       z = x
   else:
       z = y

   while(True):
       if((z % x == 0) and (z % y == 0)):
           lcm = z
           break
       z += 1

   return lcm


a=int(input())
if a == 1:
    print(1, 1)
else:
    arr=[]
    for i in range(1,a+1):
        arr.append(i)

    for i in list(combinations(arr,2)):
        re=lcm(i[0],i[1])
        if re == a:
            print(i[0],i[1])
