N=int(input()) import math n=math.ceil(N**0.5) for i in range(2,n+1): if N%i==0: print(i,N//i) exit() print(1,N)