



"""simple docstring"""




import random

from .binary_exp_mod import bin_exp_mod

def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						List[Any]						,  SCREAMING_SNAKE_CASE__     :						Dict=1_000    )  ->       Tuple:





					'''simple docstring'''

					if n < 2:
										return False

					if n % 2 == 0:
										return n == 2

					# this means n is odd
					_UpperCAmelCase      :     int        =   n - 1
					_UpperCAmelCase      :     Union[str, Any]        =   0
					while d % 2 == 0:
										d /= 2
										exp += 1

					# n - 1=d*(2**exp)
					_UpperCAmelCase      :     List[str]        =   0
					while count < prec:
										_UpperCAmelCase      :     Dict        =   random.randint(2						,  n - 1    )
										_UpperCAmelCase      :     int        =   bin_exp_mod(__lowerCamelCase						,  __lowerCamelCase						,  __lowerCamelCase    )
										if b != 1:
															_UpperCAmelCase      :     Optional[int]        =   True
															for _ in range(__lowerCamelCase    ):
																				if b == n - 1:
																									_UpperCAmelCase      :     Any        =   False
																									break
																				_UpperCAmelCase      :     List[str]        =   b * b
																				b %= n
															if flag:
																				return False
															count += 1
					return True


if __name__ == "__main__":
	_lowerCAmelCase    : Optional[Any]							=							abs(int(input("Enter bound : ").strip()))
	print("Here\'s the list of primes:")
	print(", ".join(str(i) for i in range(n + 1) if is_prime_big(i)))





"""simple docstring"""




from __future__ import annotations

from typing import Any

def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						list[Any]    )  ->       None:





     '''simple docstring'''

     create_state_space_tree(SCREAMING_SNAKE_CASE__						,  []						,  0    )

def 						__snake_case						(				SCREAMING_SNAKE_CASE__     :						list[Any]						,  SCREAMING_SNAKE_CASE__     :						list[Any]						,  SCREAMING_SNAKE_CASE__     :						int    )  ->       None:





     '''simple docstring'''

     if index == len(SCREAMING_SNAKE_CASE__    ):
          print(SCREAMING_SNAKE_CASE__    )
          return

     create_state_space_tree(SCREAMING_SNAKE_CASE__						,  SCREAMING_SNAKE_CASE__						,  index + 1    )
     current_subsequence.append(sequence[index]    )
     create_state_space_tree(SCREAMING_SNAKE_CASE__						,  SCREAMING_SNAKE_CASE__						,  index + 1    )
     current_subsequence.pop()


if __name__ == "__main__":
 _lowerCAmelCase    : list[Any]							=							[3, 1, 2, 4]
 generate_all_subsequences(seq)

 seq.clear()
 seq.extend(["A", "B", "C"])
 generate_all_subsequences(seq)
