n=int(input())

import math
x=int(math.sqrt(n))
l=[]
for i in range(1,x+1):
	if(n%i==0):
		l.append([i,n//i])

z=l[0]
mx=n
for i in l:
	if( (i[0]*i[1])//math.gcd(i[0],i[1]) )==n:
		if(max(i)<mx):
			z=i
print(*z)
		
