c = int(input()) count = 2 while True: if c%count == 0: break count += 1 print(str(count)+" "+str(c//count))