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