def gcd(a,b):
	if a<b:
		a, b = b,a
	r = a%b
	if r==0:
		return b
	else:
		return gcd(b, r)

n = int(input())
a,b,m = 1,n,n

for i in range(1,n):
	if i*i>=n:
		break
	if n%i==0:
		x = i
		y = n//i
		k = max([x,y])
		if gcd(x,y)==1 and k <= m:
			a,b,m  = x,y,k

print("{} {}".format(a,b))