def make_divisors(n): lower,upper=[],[] i=1 while i*i<=n: if n%i==0: lower.append(i) if i!=n//i: upper.append(n//i) i+=1 return lower+upper[::-1] n=int(input()) l=make_divisors(n) if len(l)==2: print(*l) else: ans1=l[1] ans2=n//ans1 print(ans1,ans2)