code: 
  
  
  """simple docstring"""
  
  
  
  
  import math
  from collections.abc import Generator
  
  
  
  def 						__a      (  a					):
  
  
  
  
  
         """simple docstring"""
  
  
  
  
  
  
  
         _a          =				(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,		a					):
                       if (i % j) == 0:
                              break
                else:
                       yield i
  
  
  
  def 						__a      (  a					):
  
  
  
  
  
         """simple docstring"""
  
  
  
  
  
  
  
         _a          =				(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)
                _a          =				int(math.sqrt(a					)					) + 1
                for j in range(2,		a					):
                       if (i % j) == 0:
                              break
                else:
                       yield i
  
  
  
  def 						__a      (  a					):
  
  
  
  
  
         """simple docstring"""
  
  
  
  
  
  
  
         _a          =				(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):
                _a          =				int(math.sqrt(a					)					) + 1
                for j in range(3,		a,		2					):
                       # As we removed the even numbers, we don't need them now
                       if (i % j) == 0:
                              break
                else:
                       yield i
  
  
  
  def 						__a      (  ):
  
  
  
  
  
         """simple docstring"""
  
  
  
  
  
  
  
         from timeit import timeit
  
         _a          =				"from __main__ import slow_primes, primes, fast_primes"
         print(timeit("slow_primes(1_000_000_000_000)",		setup=a,		number=1_0_0_0_0_0_0					)					)
         print(timeit("primes(1_000_000_000_000)",		setup=a,		number=1_0_0_0_0_0_0					)					)
         print(timeit("fast_primes(1_000_000_000_000)",		setup=a,		number=1_0_0_0_0_0_0					)					)
  
  
  if __name__ == "__main__":
     __SCREAMING_SNAKE_CASE					=						int(input("""Calculate primes up to:\n>> """).strip())
     for ret in primes(number):
        print(ret)
     benchmark()
  
style_context: 
  
  
  """simple docstring"""
  
  
  
  
  from __future__ import annotations
  
  from collections.abc import Iterator
  from typing import Any
  
  
  
  
  
  class __snake_case		:
  
  
  
  
  
  
  
     """simple docstring"""
  
  
  
  
     def __init__(		self							:List[Any]				,  UpperCamelCase__							:Any       ):
            _a          =				data
            _a          =				None
  
  
  
  
     def __str__(		self							:Any       ):
            return f'{self.data}'
  
  
  
  
  
  
  class __snake_case		:
  
  
  
  
  
  
  
     """simple docstring"""
  
  
  
  
     def __init__(		self							:Any       ):
            _a          =				None
            _a          =				None
  
  
  
  
     def __iter__(		self							:List[str]       ):
            _a          =				self.front
            while node:
                   yield node.data
                   _a          =				node.next
  
  
  
  
     def __len__(		self							:List[str]       ):
            return len(tuple(iter(self       )       )       )
  
  
  
  
     def __str__(		self							:Union[str, Any]       ):
            return " <- ".join(str(UpperCamelCase__       ) for item in self       )
  
  
  
  
     def SCREAMING_SNAKE_CASE_      (		self							:Any       ):
            return len(self       ) == 0
  
  
  
  
     def SCREAMING_SNAKE_CASE_      (		self							:List[str]				,  UpperCamelCase__							:Any       ):
            _a          =				Node(UpperCamelCase__       )
            if self.is_empty():
                   _a          =				_a          =				node
            else:
                   assert isinstance(self.rear				,  UpperCamelCase__       )
                   _a          =				node
                   _a          =				node
  
  
  
  
     def SCREAMING_SNAKE_CASE_      (		self							:Tuple       ):
            if self.is_empty():
                   raise IndexError("dequeue from empty queue"       )
            assert isinstance(self.front				,  UpperCamelCase__       )
            _a          =				self.front
            _a          =				self.front.next
            if self.front is None:
                   _a          =				None
            return node.data
  
  
  
  
     def SCREAMING_SNAKE_CASE_      (		self							:int       ):
            _a          =				_a          =				None
  
  
  if __name__ == "__main__":
     from doctest import testmod
  
     testmod()
  