from __future__ import annotations

A_      =      [True] * 1000001
A_      =      2
while i * i <= 1000000:
						if seive[i]:
												for j in range(i * i, 1000001, i):
																		A_      =      False
						i += 1






def        __UpperCAmelCase    (       UpperCAmelCase       )->       bool:



			"""simple docstring"""







			return seive[n]






def        __UpperCAmelCase    (       UpperCAmelCase       )->       bool:



			"""simple docstring"""







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






def        __UpperCAmelCase    (       UpperCAmelCase = 1000000       )->       list[int]:



			"""simple docstring"""







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






def        __UpperCAmelCase    (       )->       int:



			"""simple docstring"""







			return len(find_circular_primes()       )


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






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase       )->       int:



			"""simple docstring"""







			while a != 0:
						lowercase		,lowercase							=		b % a, a
			return b






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase       )->       int:



			"""simple docstring"""







			if gcd(UpperCAmelCase,		UpperCAmelCase       ) != 1:
						lowercase							=		f'mod inverse of {a!r} and {m!r} does not exist'
						raise ValueError(UpperCAmelCase       )
			lowercase		,lowercase		,lowercase							=		1, 0, a
			lowercase		,lowercase		,lowercase							=		0, 1, m
			while va != 0:
						lowercase							=		ua // va
						lowercase		,lowercase		,lowercase		,lowercase		,lowercase		,lowercase							=		(ua - q * va), (ua - q * va), (ua - q * va), va, va, va
			return ua % m





