M = int(input()) rM = int(M**0.5) for i in range(rM, 0, -1): if M % i == 0: break print(i, M//i)