


"""simple docstring"""



import random

from .binary_exp_mod import bin_exp_mod







def 						__lowerCAmelCase		(		lowercase						:						Optional[Any]		,							lowercase						:						Tuple=1000				)			->		Any:


    """simple docstring"""





    if n < 2:
        return False

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

    # this means n is odd
    snake_case					:   Optional[Any]         =					n - 1
    snake_case					:   Any         =					0
    while d % 2 == 0:
        d /= 2
        exp += 1

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


if __name__ == "__main__":
 __snake_case         =					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"""



import baseaa







def 						__lowerCAmelCase		(		lowercase						:						str				)			->		bytes:


    """simple docstring"""





    return baseaa.aaaencode(string.encode("utf-8"				)				)







def 						__lowerCAmelCase		(		lowercase						:						bytes				)			->		str:


    """simple docstring"""





    return baseaa.aaadecode(lowercase				).decode("utf-8"				)


if __name__ == "__main__":
  import doctest

  doctest.testmod()





