M = int(input()) for i in range(2, min(M, 1000001)): if M % i == 0: exit(print(i, M // i)) print(1, M)