M = int(input()) sqrt = int(M ** 0.5) ans = 1 for i in range(2, sqrt + 1): if M % i == 0: ans = i break print(ans, M // ans)