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