m = int(input()) for i in range(2, int(m ** 0.5) + 1): if m % i == 0: print(i, m // i) exit() print(1, m)