

"""simple docstring"""




from __future__ import annotations

from typing import Generic, TypeVar

A_							:     List[str]     =	TypeVar("T")





class 				lowerCamelCase  (Generic[T]     ):

			def __init__(   self			:  int      ,			__UpperCAmelCase			:  T    )				->      str:
						SCREAMING_SNAKE_CASE__									= data  # Assign data
						SCREAMING_SNAKE_CASE__									= None  # Initialize next as null
						SCREAMING_SNAKE_CASE__									= None  # Initialize prev as null





class 				lowerCamelCase  (Generic[T]     ):

			def __init__(   self			:  List[Any]    )				->      None:
						SCREAMING_SNAKE_CASE__									= None

			def    SCREAMING_SNAKE_CASE			(   self			:  str      ,			__UpperCAmelCase			:  T    )				->      None:
						if self.head is None:
									SCREAMING_SNAKE_CASE__									= Node(__UpperCAmelCase    )
						else:
									SCREAMING_SNAKE_CASE__									= Node(__UpperCAmelCase    )
									SCREAMING_SNAKE_CASE__									= new_node
									SCREAMING_SNAKE_CASE__									= self.head
									SCREAMING_SNAKE_CASE__									= None
									SCREAMING_SNAKE_CASE__									= new_node

			def    SCREAMING_SNAKE_CASE			(   self			:  Any    )				->      T | None:
						if self.head is None:
									return None
						else:
									assert self.head is not None
									SCREAMING_SNAKE_CASE__									= self.head.data
									SCREAMING_SNAKE_CASE__									= self.head.next
									if self.head is not None:
												SCREAMING_SNAKE_CASE__									= None
									return temp

			def    SCREAMING_SNAKE_CASE			(   self			:  List[Any]    )				->      T | None:
						return self.head.data if self.head is not None else None

			def __len__(   self			:  Optional[Any]    )				->      int:
						SCREAMING_SNAKE_CASE__									= self.head
						SCREAMING_SNAKE_CASE__									= 0
						while temp is not None:
									count += 1
									SCREAMING_SNAKE_CASE__									= temp.next
						return count

			def    SCREAMING_SNAKE_CASE			(   self			:  Optional[Any]    )				->      bool:
						return self.head is None





			def    SCREAMING_SNAKE_CASE			(   self			:  int    )				->      None:
						print("""stack elements are:"""    )
						SCREAMING_SNAKE_CASE__									= self.head
						while temp is not None:
									print(temp.data      ,			end="""->"""    )
									SCREAMING_SNAKE_CASE__									= temp.next


# Code execution starts here
if __name__ == "__main__":
						# Start with the empty stack
						A_							:     Stack[int]     =	Stack()

						# Insert 4 at the beginning. So stack becomes 4->None
						print("Stack operations using Doubly LinkedList")
						stack.push(4)

						# Insert 5 at the beginning. So stack becomes 4->5->None
						stack.push(5)

						# Insert 6 at the beginning. So stack becomes 4->5->6->None
						stack.push(6)

						# Insert 7 at the beginning. So stack becomes 4->5->6->7->None
						stack.push(7)

						# Print the stack
						stack.print_stack()

						# Print the top element
						print("\nTop element is ", stack.top())

						# Print the stack size
						print("Size of the stack is ", len(stack))

						# pop the top element
						stack.pop()

						# pop the top element
						stack.pop()

						# two elements have now been popped off
						stack.print_stack()

						# Print True if the stack is empty else False
						print("\nstack is empty:", stack.is_empty())





"""simple docstring"""




import math

def 		A    (       snake_case__      ):




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

def 		A    (       snake_case__ = 10_00						,			snake_case__ = 10_00      ):




			'''simple docstring'''


			SCREAMING_SNAKE_CASE__									= [0, 0, 0]  # length, a, b
			for a in range((a_limit * -1) + 1						,			snake_case__      ):
						for b in range(2						,			snake_case__      ):
									if is_prime(snake_case__      ):
												SCREAMING_SNAKE_CASE__									= 0
												SCREAMING_SNAKE_CASE__									= 0
												while is_prime((n**2) + (a * n) + b      ):
															count += 1
															n += 1
												if count > longest[0]:
															SCREAMING_SNAKE_CASE__									= [count, a, b]
			SCREAMING_SNAKE_CASE__									= longest[1] * longest[2]
			return ans


if __name__ == "__main__":
						print(solution(1_000, 1_000))


