

from __future__ import annotations

snake_case_ :    Any        =			[True] * 1_000_001
snake_case_ :    List[str]        =			2
while i * i <= 1_000_000:
       if seive[i]:
              for j in range(i * i, 1_000_001, i):
                     snake_case_ :    List[str]        =			False
       i += 1

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     return seive[n]

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     return any(digit in '02468' for digit in str(SCREAMING_SNAKE_CASE_      )      )

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int = 1_000_000      ):



     '''simple docstring'''





     lowercase__   :       List[Any]				=	[2]  # result already includes the number 2.
     for num in range(3     ,					limit + 1     ,					2      ):
          if is_prime(SCREAMING_SNAKE_CASE_      ) and not contains_an_even_digit(SCREAMING_SNAKE_CASE_      ):
               lowercase__   :       List[Any]				=	str(SCREAMING_SNAKE_CASE_      )
               lowercase__   :       Any				=	[int(str_num[j:] + str_num[:j]      ) for j in range(len(SCREAMING_SNAKE_CASE_      )      )]
               if all(is_prime(SCREAMING_SNAKE_CASE_      ) for i in list_nums      ):
                    result.append(SCREAMING_SNAKE_CASE_      )
     return result

def      snake_case__      (   ):



     '''simple docstring'''





     return len(find_circular_primes()      )


if __name__ == "__main__":
       print(F'''{len(find_circular_primes()) = }''')




import math
import sys

def      snake_case__      (   SCREAMING_SNAKE_CASE_		:   int      ):



     '''simple docstring'''





     if number != int(SCREAMING_SNAKE_CASE_      ):
          raise ValueError('the value of input must be a natural number'      )
     if number < 0:
          raise ValueError('the value of input must not be a negative number'      )
     if number == 0:
          return 1
     lowercase__   :       Tuple				=	[-1] * (number + 1)
     lowercase__   :       Tuple				=	0
     for i in range(1     ,					number + 1      ):
          lowercase__   :       Tuple				=	sys.maxsize
          lowercase__   :       str				=	int(math.sqrt(SCREAMING_SNAKE_CASE_      )      )
          for j in range(1     ,					root + 1      ):
               lowercase__   :       List[Any]				=	1 + answers[i - (j**2)]
               lowercase__   :       str				=	min(SCREAMING_SNAKE_CASE_     ,					SCREAMING_SNAKE_CASE_      )
          lowercase__   :       List[str]				=	answer
     return answers[number]


if __name__ == "__main__":
       import doctest

       doctest.testmod()

