M = int(input()) i = 2 while i * i <= M: if M % i == 0: print(i, M // i) exit() i += 1 print(1,M)