N=int(input()) for i in range(2,10**6+10): if N%i==0: print(i,N//i) break