from itertools import compress, repeat
from math import ceil, sqrt


def SCREAMING_SNAKE_CASE					(  lowercase_:						int					):

       if num <= 2:
              return []
       if num == 3:
              return [2]

       # Odd sieve for numbers in range [3, num - 1]
       _UpperCamelCase  :							Dict	    =	bytearray(b'\x01'					) * ((num >> 1) - 1)

       for i in range(3		,    int(sqrt(lowercase_					)					) + 1		,    2					):
              if sieve[(i >> 1) - 1]:
                     _UpperCamelCase  :							Optional[Any]	    =	i**2
                     _UpperCamelCase  :							List[str]	    =	repeat(
                         0		,    ceil((num - i_squared) / (i << 1)					)					)

       return [2] + list(compress(range(3		,    lowercase_		,    2					)		,    lowercase_					)					)


if __name__ == "__main__":
 import doctest

 doctest.testmod()




"""simple docstring"""







from __future__ import annotations

import math
import random


def   __lowerCAmelCase(		__UpperCAmelCase  ,__UpperCAmelCase  ,__UpperCAmelCase      ):






	"""simple docstring"""





	_lowercase			:     Optional[int]      					=				d * e - 1
	_lowercase			:     int      					=				0
	_lowercase			:     Union[str, Any]      					=				0
	while p == 0:
		_lowercase			:     int      					=				random.randint(2  ,n - 1      )
		_lowercase			:     str      					=				k
		while True:
			if t % 2 == 0:
				_lowercase			:     List[Any]      					=				t // 2
				_lowercase			:     int      					=				(g**t) % n
				_lowercase			:     Tuple      					=				math.gcd(x - 1  ,__UpperCAmelCase      )
				if x > 1 and y > 1:
					_lowercase			:     List[str]      					=				y
					_lowercase			:     str      					=				n // y
					break  # find the correct factors
			else:
				break  # t is not divisible by 2, break and choose another g
	return sorted([p, q]      )


if __name__ == "__main__":
						import doctest

						doctest.testmod()



