#YUKI414 m=int(raw_input()) x=1 y=m i=2 while i**2<=m: if m%i==0: x=i y=m/i break i+=1 print x,y