
import math
def 					__lowerCAmelCase       (_UpperCamelCase	):
	__lowerCAmelCase    :		Tuple		    =   [True] * n
	__lowerCAmelCase    :		Any		    =   False
	__lowerCAmelCase    :		Union[str, Any]		    =   False
	__lowerCAmelCase    :		Tuple		    =   True

	for i in range(3 ,						int(n**0.5 + 1	) ,						2	):
		__lowerCAmelCase    :		int		    =   i * 2
		while index < n:
			__lowerCAmelCase    :		Dict		    =   False
			__lowerCAmelCase    :		Tuple		    =   index + i

	__lowerCAmelCase    :		List[Any]		    =   [2]

	for i in range(3 ,						_UpperCamelCase ,						2	):
		if is_prime[i]:
			primes.append(_UpperCamelCase	)

	return primes
def 					__lowerCAmelCase       (_UpperCamelCase = 9999_6666_3333	):
	__lowerCAmelCase    :		List[str]		    =   math.floor(math.sqrt(_UpperCamelCase	)	) + 100
	__lowerCAmelCase    :		Union[str, Any]		    =   prime_sieve(_UpperCamelCase	)

	__lowerCAmelCase    :		Optional[Any]		    =   0
	__lowerCAmelCase    :		List[str]		    =   0
	__lowerCAmelCase    :		Optional[int]		    =   primes[prime_index]

	while (last_prime**2) <= limit:
		__lowerCAmelCase    :		List[str]		    =   primes[prime_index + 1]

		__lowerCAmelCase    :		List[Any]		    =   last_prime**2
		__lowerCAmelCase    :		Any		    =   next_prime**2

		# Get numbers divisible by lps(current)
		__lowerCAmelCase    :		Dict		    =   lower_bound + last_prime
		while upper_bound > current <= limit:
			matches_sum += current
			current += last_prime

		# Reset the upper_bound
		while (upper_bound - next_prime) > limit:
			upper_bound -= next_prime

		# Add the numbers divisible by ups(current)
		__lowerCAmelCase    :		Dict		    =   upper_bound - next_prime
		while current > lower_bound:
			matches_sum += current
			current -= next_prime

		# Remove the numbers divisible by both ups and lps
		__lowerCAmelCase    :		Union[str, Any]		    =   0
		while upper_bound > current <= limit:
			if current <= lower_bound:
				# Increment the current number
				current += last_prime * next_prime
				continue

			if current > limit:
				break

			# Remove twice since it was added by both ups and lps
			matches_sum -= current * 2

			# Increment the current number
			current += last_prime * next_prime

		# Setup for next pair
		__lowerCAmelCase    :		List[str]		    =   next_prime
		prime_index += 1

	return matches_sum


if __name__ == "__main__":
							print(solution())

"""simple docstring"""







def 					__lowerCAmelCase       (_UpperCamelCase ,						_UpperCamelCase ,						_UpperCamelCase	):
	__lowerCAmelCase    :		List[str]		    =   len(_UpperCamelCase	)
	__lowerCAmelCase    :		Tuple		    =   [[0] * n for i in range(_UpperCamelCase	)]
	for i in range(_UpperCamelCase	):
		__lowerCAmelCase    :		Any		    =   y_points[i]

	for i in range(2 ,						_UpperCamelCase	):
		for j in range(_UpperCamelCase ,						_UpperCamelCase	):
			__lowerCAmelCase    :		int		    =   (
			    (xa - x_points[j - i + 1]) * q[j][i - 1]
			    - (xa - x_points[j]) * q[j - 1][i - 1]
			) / (x_points[j] - x_points[j - i + 1])

	return [q[n - 1][n - 1], q]


if __name__ == "__main__":
							import doctest

							doctest.testmod()