def gcd(x,y):
	if x==0:
		return y
	return gcd(y%x,x)
	

x=int(input())
for a in range(int(x**(0.5)),0,-1):
	if x%a==0:
		if a==1:
			print(a,x)
			break
		else:
			b=x//a
			if b%a!=0 and gcd(a,b)==1:
				print(a,b)
				break
				
			
	
			