'''simple docstring'''

import math



def  _lowerCAmelCase				(				__a      )  ->      bool:
     '''simple docstring'''







     if 1 < number < 4:
          # 2 and 3 are primes
          return True
     elif number < 2 or number % 2 == 0 or number % 3 == 0:
          # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
          return False

     # All primes number are in format of 6k +/- 1
     for i in range(5			,      int(math.sqrt(__a      ) + 1      )			,      6      ):
          if number % i == 0 or number % (i + 2) == 0:
               return False
     return True



def  _lowerCAmelCase				(				__a = 10_00			,      __a = 10_00      )  ->      int:
     '''simple docstring'''







     _UpperCamelCase  :Any       =[0, 0, 0]  # length, a, b
     for a in range((a_limit * -1) + 1			,      __a      ):
          for b in range(2			,      __a      ):
               if is_prime(__a      ):
                    _UpperCamelCase  :Union[str, Any]       =0
                    _UpperCamelCase  :int       =0
                    while is_prime((n**2) + (a * n) + b      ):
                         count += 1
                         n += 1
                    if count > longest[0]:
                         _UpperCamelCase  :int       =[count, a, b]
     _UpperCamelCase  :List[Any]       =longest[1] * longest[2]
     return ans


if __name__ == "__main__":
      print(solution(10_00, 10_00))




'''simple docstring'''

from __future__ import annotations

_A					:     Union[str, Any]      ='''Alexander Joslin'''







def     __UpperCamelCase					(				_lowercase       )			->      int:

	if number <= 0:
		_lowercase       :							Optional[Any]  	=		f'''n must be greater than 0. Got n = {number}'''
		raise ValueError(_lowercase       )

	_lowercase       :							List[str]  	=		[number + 1] * (number + 1)

	# starting position
	_lowercase       :							str  	=		0
	for i in range(1,					_lowercase       ):
		_lowercase       :							Union[str, Any]  	=		min(table[i + 1],					table[i] + 1       )
		# check if out of bounds
		if i * 2 <= number:
			_lowercase       :							Optional[Any]  	=		min(table[i * 2],					table[i] + 1       )
		# check if out of bounds
		if i * 3 <= number:
			_lowercase       :							Any  	=		min(table[i * 3],					table[i] + 1       )
	return table[number]


if __name__ == "__main__":
		import doctest

		doctest.testmod()
