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