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