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