M = int(input()) import sys C = 10 ** 6 dat = [0] * C for i in range(2,C): if dat[i] == 0: for j in ragne(2 * i,C,i): dat[j] = 1 if M % i == 0: print(i,M//i) exit()