M = int(input()) if M == 1: x = 1 elif M % 2 == 0: x = 2 else: for i in range(3, int(M**.5) + 1, 2): if M % i == 0: x = i break else: x = 1 print(x, M//x)