N=int(input()) a=N b=10**9 for i in reversed(range(1,int(N**0.5)+1)): buf=N/i**2 if buf==int(buf) and b>int(buf):a,b=i,int(buf) print(a,b)