import math c = int(input()) for i in range(2,math.floor(math.sqrt(c))+1): if c%i==0: t=i break print(str(t)+" "+str(c//t))