import math n=int(input()) a=round(math.sqrt(n)) k=1 for i in range(2,a): if n%i==0: k=i break print(k,round(n/k))