



'''simple docstring'''
from __future__ import annotations






def A__					(  UpperCAmelCase_						,						UpperCAmelCase_						,						UpperCAmelCase_							):
						assert (
						    c % greatest_common_divisor(UpperCAmelCase_						,						UpperCAmelCase_							) == 0
						)  # greatest_common_divisor(a,b) function implemented below
						((_UpperCamelCase)       ,    (_UpperCamelCase)       ,    (_UpperCamelCase))      :	int				       =     extended_gcd(UpperCAmelCase_						,						UpperCAmelCase_							)  # extended_gcd(a,b) function implemented below
						_UpperCamelCase      :	Any				       =     c / d
						return (r * x, r * y)






def A__					(  UpperCAmelCase_						,						UpperCAmelCase_						,						UpperCAmelCase_						,						UpperCAmelCase_ = 2							):
						((_UpperCamelCase)       ,    (_UpperCamelCase))      :	Tuple				       =     diophantine(UpperCAmelCase_						,						UpperCAmelCase_						,						UpperCAmelCase_							)  # Initial value
						_UpperCamelCase      :	Optional[Any]				       =     greatest_common_divisor(UpperCAmelCase_						,						UpperCAmelCase_							)
						_UpperCamelCase      :	List[Any]				       =     a // d
						_UpperCamelCase      :	Tuple				       =     b // d

						for i in range(UpperCAmelCase_							):
												_UpperCamelCase      :	str				       =     xa + i * q
												_UpperCamelCase      :	Union[str, Any]				       =     ya - i * p
												print(UpperCAmelCase_						,						UpperCAmelCase_							)






def A__					(  UpperCAmelCase_						,						UpperCAmelCase_							):
						if a < b:
												_UpperCamelCase       ,    _UpperCamelCase      :	Optional[Any]				       =     b, a

						while a % b != 0:
												_UpperCamelCase       ,    _UpperCamelCase      :	str				       =     b, a % b

						return b






def A__					(  UpperCAmelCase_						,						UpperCAmelCase_							):
						assert a >= 0 and b >= 0

						if b == 0:
												_UpperCamelCase       ,    _UpperCamelCase       ,    _UpperCamelCase      :	Optional[int]				       =     a, 1, 0
						else:
												((_UpperCamelCase)       ,    (_UpperCamelCase)       ,    (_UpperCamelCase))      :	int				       =     extended_gcd(UpperCAmelCase_						,						a % b							)
												_UpperCamelCase      :	Dict				       =     q
												_UpperCamelCase      :	Tuple				       =     p - q * (a // b)

						assert a % d == 0 and b % d == 0
						assert d == a * x + b * y

						return (d, x, y)


if __name__ == "__main__":
					from doctest import testmod

					testmod(name='diophantine', verbose=True)
					testmod(name='diophantine_all_soln', verbose=True)
					testmod(name='extended_gcd', verbose=True)
					testmod(name='greatest_common_divisor', verbose=True)







'''simple docstring'''
import math






def A__					(  UpperCAmelCase_							):

						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or number % 2 == 0 or number % 3 == 0:
												# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
												return False

						# All primes number are in format of 6k +/- 1
						for i in range(5						,						int(math.sqrt(UpperCAmelCase_							) + 1							)						,						6							):
												if number % i == 0 or number % (i + 2) == 0:
																		return False
						return True






def A__					(  UpperCAmelCase_ = 1_0_0_0						,						UpperCAmelCase_ = 1_0_0_0							):
						_UpperCamelCase      :	str				       =     [0, 0, 0]  # length, a, b
						for a in range((a_limit * -1) + 1						,						UpperCAmelCase_							):
												for b in range(2						,						UpperCAmelCase_							):
																		if is_prime(UpperCAmelCase_							):
																								_UpperCamelCase      :	List[str]				       =     0
																								_UpperCamelCase      :	Union[str, Any]				       =     0
																								while is_prime((n**2) + (a * n) + b							):
																														count += 1
																														n += 1
																								if count > longest[0]:
																														_UpperCamelCase      :	Any				       =     [count, a, b]
						_UpperCamelCase      :	Dict				       =     longest[1] * longest[2]
						return ans


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


