from math import isqrt M = int(input()) for i in range(isqrt(M), 0, -1): if not M % i: print(i, M // i) exit()