n=int(input()) a=1 i=2 while i*i<=n: if n%i==0:a=i i+=1 print(a,n//i)