


"""simple docstring"""
from __future__ import annotations

from collections import Counter







def     _a					(   _SCREAMING_SNAKE_CASE					)     ->					list[int]:
							snake_case_     							=		[True] * n
							snake_case_     							=		False
							snake_case_     							=		False
							snake_case_     							=		True

							for i in range(3					,			int(n**0.5 + 1					)					,			2					):
														snake_case_     							=		i * 2
														while index < n:
																					snake_case_     							=		False
																					snake_case_     							=		index + i

							snake_case_     							=		[2]

							for i in range(3					,			_snake_case					,			2					):
														if is_prime[i]:
																					primes.append(_snake_case					)

							return primes







def     _a					(   _SCREAMING_SNAKE_CASE					)     ->					list[list[int]]:
							snake_case_     							=		str(_snake_case					)
							snake_case_     							=		[]
							snake_case_     							=		['''0''', '''1''', '''2''', '''3''', '''4''', '''5''', '''6''', '''7''', '''8''', '''9''']

							for duplicate in Counter(_snake_case					) - Counter(set(_snake_case					)					):
														snake_case_     							=		[int(number_str.replace(_snake_case					,			_snake_case					)					) for digit in digits]
														replacements.append(_snake_case					)

							return replacements







def     _a					(   _SCREAMING_SNAKE_CASE = 8					)     ->					int:
							snake_case_     							=		set()

							# Filter primes with less than 3 replaceable digits
							snake_case_     							=		{
							    x for x in set(prime_sieve(1_000_000					)					) if len(str(_snake_case					)					) - len(set(str(_snake_case					)					)					) >= 3
							}

							for prime in primes:
														if prime in numbers_checked:
																					continue

														snake_case_     							=		digit_replacements(_snake_case					)

														for family in replacements:
																					numbers_checked.update(_snake_case					)
																					snake_case_     							=		primes.intersection(_snake_case					)

																					if len(_snake_case					) != family_length:
																												continue

																					return min(_snake_case					)

							return -1


if __name__ == "__main__":
				print(solution())







"""simple docstring"""
from __future__ import annotations

import math
import random






def 						lowercase				(	_snake_case		: int	,  _snake_case		: int	,  _snake_case		: int	)	->list[int]:
	"""simple docstring"""





	__snake_case      :		Tuple         =							d * e - 1
	__snake_case      :		List[str]         =							0
	__snake_case      :		Dict         =							0
	while p == 0:
		__snake_case      :		str         =							random.randint(2	,  n - 1	)
		__snake_case      :		int         =							k
		while True:
			if t % 2 == 0:
				__snake_case      :		int         =							t // 2
				__snake_case      :		int         =							(g**t) % n
				__snake_case      :		Optional[Any]         =							math.gcd(x - 1	,  _snake_case	)
				if x > 1 and y > 1:
					__snake_case      :		Tuple         =							y
					__snake_case      :		int         =							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()





