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