M = int(input()) for i in range(2,M): if M % i == 0: print(i,M//i) exit() elif i * i > M * 2: print(1,M) exit()