





import math
from collections.abc import Generator






def 			lowerCamelCase__	(__lowerCamelCase		):
     _SCREAMING_SNAKE_CASE				:		Generator  			=							(i for i in range(1,				(max_n + 1)		))
     for i in (n for n in numbers if n > 1):
          for j in range(2,				__lowerCamelCase		):
               if (i % j) == 0:
                    break
          else:
               yield i






def 			lowerCamelCase__	(__lowerCamelCase		):
     _SCREAMING_SNAKE_CASE				:		Generator  			=							(i for i in range(1,				(max_n + 1)		))
     for i in (n for n in numbers if n > 1):
          # only need to check for factors up to sqrt(i)
          _SCREAMING_SNAKE_CASE				:		Optional[int]  			=							int(math.sqrt(__lowerCamelCase		)		) + 1
          for j in range(2,				__lowerCamelCase		):
               if (i % j) == 0:
                    break
          else:
               yield i






def 			lowerCamelCase__	(__lowerCamelCase		):
     _SCREAMING_SNAKE_CASE				:		Generator  			=							(i for i in range(1,				(max_n + 1),				2		))
     # It's useless to test even numbers as they will not be prime
     if max_n > 2:
          yield 2  # Because 2 will not be tested, it's necessary to yield it now
     for i in (n for n in numbers if n > 1):
          _SCREAMING_SNAKE_CASE				:		List[Any]  			=							int(math.sqrt(__lowerCamelCase		)		) + 1
          for j in range(3,				__lowerCamelCase,				2		):
               # As we removed the even numbers, we don't need them now
               if (i % j) == 0:
                    break
          else:
               yield i






def 			lowerCamelCase__	():
     from timeit import timeit

     _SCREAMING_SNAKE_CASE				:		int  			=							"from __main__ import slow_primes, primes, fast_primes"
     print(timeit("slow_primes(1_000_000_000_000)",				setup=__lowerCamelCase,				number=1000000		)		)
     print(timeit("primes(1_000_000_000_000)",				setup=__lowerCamelCase,				number=1000000		)		)
     print(timeit("fast_primes(1_000_000_000_000)",				setup=__lowerCamelCase,				number=1000000		)		)


if __name__ == "__main__":
       UpperCamelCase__          =int(input('Calculate primes up to:\n>> ').strip())
       for ret in primes(number):
              print(ret)
       benchmark()






from typing import Literal

UpperCamelCase__          ='ABCDEFGHIJKLMNOPQRSTUVWXYZ'






def 			lowerCamelCase__	(__lowerCamelCase,				__lowerCamelCase,				__lowerCamelCase		):
     _SCREAMING_SNAKE_CASE				:		Tuple  			=							LETTERS if mode == "decrypt" else key
     _SCREAMING_SNAKE_CASE				:		Tuple  			=							key if mode == "decrypt" else LETTERS
     _SCREAMING_SNAKE_CASE				:		Dict  			=							""
     # loop through each symbol in the message
     for symbol in message:
          if symbol.upper() in chars_a:
               # encrypt/decrypt the symbol
               _SCREAMING_SNAKE_CASE				:		List[str]  			=							chars_a.find(symbol.upper()		)
               if symbol.isupper():
                    translated += chars_b[sym_index].upper()
               else:
                    translated += chars_b[sym_index].lower()
          else:
               # symbol is not in LETTERS, just add it
               translated += symbol
     return translated






def 			lowerCamelCase__	(__lowerCamelCase,				__lowerCamelCase		):
     return translate_message(__lowerCamelCase,				__lowerCamelCase,				"encrypt"		)






def 			lowerCamelCase__	(__lowerCamelCase,				__lowerCamelCase		):
     return translate_message(__lowerCamelCase,				__lowerCamelCase,				"decrypt"		)






def 			lowerCamelCase__	():
     _SCREAMING_SNAKE_CASE				:		str  			=							"Hello World"
     _SCREAMING_SNAKE_CASE				:		List[str]  			=							"QWERTYUIOPASDFGHJKLZXCVBNM"
     _SCREAMING_SNAKE_CASE				:		Any  			=							"decrypt"  # set to 'encrypt' or 'decrypt'

     if mode == "encrypt":
          _SCREAMING_SNAKE_CASE				:		int  			=							encrypt_message(__lowerCamelCase,				__lowerCamelCase		)
     elif mode == "decrypt":
          _SCREAMING_SNAKE_CASE				:		Optional[int]  			=							decrypt_message(__lowerCamelCase,				__lowerCamelCase		)
     print(f"""Using the key {key}, the {mode}ed message is: {translated}"""		)


if __name__ == "__main__":
       import doctest

       doctest.testmod()
       main()