import math
t=int(input())
mini=1000000000000
ans=1
for i in range(1,int(pow(t,0.5)+1)):
	a=i
	b=t//i
	#x=a*b//math.gcd(a,b)
	if a*b==t and b%a!=0 and math.gcd(a,b)==1:
		#print(a,end=" ")
		#print(b)
		if max(a,b)<mini:
			mini=max(a,b)
			#print(mini)
			ans=a
A=[]
A.append(ans)
A.append(t//ans)
print(A[0],end=" ")
print(A[1])