




"""simple docstring"""





import math

def 		lowerCAmelCase				(			lowerCamelCase		):
						'''simple docstring'''


						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(lowerCamelCase		) + 1		)   ,      6		):
												if number % i == 0 or number % (i + 2) == 0:
																		return False
						return True

def 		lowerCAmelCase				(			lowerCamelCase = 1000   ,      lowerCamelCase = 1000		):
						'''simple docstring'''


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


if __name__ == "__main__":
							print(solution(10_00, 10_00))








"""simple docstring"""





_lowercase						   =     {0: [1, 2], 1: [0, 3], 2: [0], 3: [1], 4: [5, 6], 5: [4, 6], 6: [4, 5]}

_lowercase						   =     {0: [1, 2, 3], 1: [0, 3], 2: [0], 3: [0, 1], 4: [], 5: []}

def 		lowerCAmelCase				(			lowerCamelCase   ,      lowerCamelCase   ,      lowerCamelCase		):
						'''simple docstring'''


						snake_case__							:       Any				      =       True
						snake_case__							:       int				      =       []

						for neighbour in graph[vert]:
												if not visited[neighbour]:
																		connected_verts += dfs(lowerCamelCase   ,      lowerCamelCase   ,      lowerCamelCase		)

						return [vert, *connected_verts]

def 		lowerCAmelCase				(			lowerCamelCase		):
						'''simple docstring'''


						snake_case__							:       Optional[int]				      =       len(lowerCamelCase		)
						snake_case__							:       str				      =       graph_size * [False]
						snake_case__							:       List[str]				      =       []

						for i in range(lowerCamelCase		):
												if not visited[i]:
																		snake_case__							:       Dict				      =       dfs(lowerCamelCase   ,      lowerCamelCase   ,      lowerCamelCase		)
																		components_list.append(lowerCamelCase		)

						return components_list


if __name__ == "__main__":
							import doctest

							doctest.testmod()


