import math
X = int(input())
pairs = []
for i in range(1,int(math.sqrt(X))+1):
	if X%i == 0:
		a = i
		b = int(X/i)
		if a != b:
			pairs.append((a,b))
minimum = float("Inf")
for i in pairs:
	maximum = max(i)
	if (minimum > maximum):
		minimum = maximum
		tup = i
print(tup)