
from __future__ import annotations

from collections.abc import Iterator
from typing import Any



class 		UpperCamelCase__  :
   def __init__(self			: Any ,    snake_case_			: Any       ):
    __a			:  Any		    =  data
    __a			:  Node | None		    =  None





class 		UpperCamelCase__  :
   def __init__(self			: Optional[int]       ):
    __a			:  Tuple		    =  None
    __a			:  Any		    =  None
   def __iter__(self			: Dict       ):
    __a			:  List[Any]		    =  self.head
    while self.head:
     yield node.data
     __a			:  List[Any]		    =  node.next
     if node == self.head:
      break
   def __len__(self			: Dict       ):
    return sum(1 for _ in self       )
   def __repr__(self			: Dict       ):
    return "->".join(str(snake_case_       ) for item in iter(self       )       )
   def 				lowerCAmelCase      (self			: List[str] ,    snake_case_			: Any       ):
    self.insert_nth(len(self       ) ,    snake_case_       )
   def 				lowerCAmelCase      (self			: int ,    snake_case_			: Any       ):
    self.insert_nth(0 ,    snake_case_       )
   def 				lowerCAmelCase      (self			: Tuple ,    snake_case_			: int ,    snake_case_			: Any       ):
    if index < 0 or index > len(self       ):
     raise IndexError('''list index out of range.'''       )
    __a			:  str		    =  Node(snake_case_       )
    if self.head is None:
     __a			:  Any		    =  new_node  # first node points itself
     __a			:  Optional[Any]		    =  new_node
    elif index == 0:  # insert at head
     __a			:  Dict		    =  self.head
     __a			:  str		    =  new_node
    else:
     __a			:  Dict		    =  self.head
     for _ in range(index - 1       ):
      __a			:  Any		    =  temp.next
     __a			:  List[str]		    =  temp.next
     __a			:  Dict		    =  new_node
     if index == len(self       ) - 1:  # insert at tail
      __a			:  Dict		    =  new_node
   def 				lowerCAmelCase      (self			: Union[str, Any]       ):
    return self.delete_nth(0       )
   def 				lowerCAmelCase      (self			: int       ):
    return self.delete_nth(len(self       ) - 1       )
   def 				lowerCAmelCase      (self			: Optional[Any] ,    snake_case_			: int = 0       ):
    if not 0 <= index < len(self       ):
     raise IndexError('''list index out of range.'''       )
    __a			:  List[Any]		    =  self.head
    if self.head == self.tail:  # just one node
     __a			:  Any		    =  None
    elif index == 0:  # delete head node
     __a			:  int		    =  self.tail.next.next
     __a			:  List[Any]		    =  self.head.next
    else:
     __a			:  List[str]		    =  self.head
     for _ in range(index - 1       ):
      __a			:  Union[str, Any]		    =  temp.next
     __a			:  List[str]		    =  temp.next
     __a			:  Dict		    =  temp.next.next
     if index == len(self       ) - 1:  # delete at tail
      __a			:  List[Any]		    =  temp
    return delete_node.data







   def 				lowerCAmelCase      (self			: List[Any]       ):
    return len(self       ) == 0





def        __UpperCamelCase					(    ):
 __a			:  Tuple		    =  CircularLinkedList()
 assert len(lowerCAmelCase__  ) == 0
 assert circular_linked_list.is_empty() is True
 assert str(lowerCAmelCase__  ) == ""

 try:
  circular_linked_list.delete_front()
  raise AssertionError  # This should not happen
 except IndexError:
  assert True  # This should happen

 try:
  circular_linked_list.delete_tail()
  raise AssertionError  # This should not happen
 except IndexError:
  assert True  # This should happen

 try:
  circular_linked_list.delete_nth(-1  )
  raise AssertionError
 except IndexError:
  assert True

 try:
  circular_linked_list.delete_nth(0  )
  raise AssertionError
 except IndexError:
  assert True

 assert circular_linked_list.is_empty() is True
 for i in range(5  ):
  assert len(lowerCAmelCase__  ) == i
  circular_linked_list.insert_nth(lowerCAmelCase__  ,       i + 1  )
 assert str(lowerCAmelCase__  ) == "->".join(str(lowerCAmelCase__  ) for i in range(1  ,       6  )  )

 circular_linked_list.insert_tail(6  )
 assert str(lowerCAmelCase__  ) == "->".join(str(lowerCAmelCase__  ) for i in range(1  ,       7  )  )
 circular_linked_list.insert_head(0  )
 assert str(lowerCAmelCase__  ) == "->".join(str(lowerCAmelCase__  ) for i in range(0  ,       7  )  )

 assert circular_linked_list.delete_front() == 0
 assert circular_linked_list.delete_tail() == 6
 assert str(lowerCAmelCase__  ) == "->".join(str(lowerCAmelCase__  ) for i in range(1  ,       6  )  )
 assert circular_linked_list.delete_nth(2  ) == 3

 circular_linked_list.insert_nth(2  ,       3  )
 assert str(lowerCAmelCase__  ) == "->".join(str(lowerCAmelCase__  ) for i in range(1  ,       6  )  )

 assert circular_linked_list.is_empty() is False


if __name__ == "__main__":
      import doctest

      doctest.testmod()


def        __UpperCamelCase					(    lowerCAmelCase__							:    int = 1_0_0_0  ):
 __a			:  int		    =  -1
 __a			:  Any		    =  0
 for a in range(1  ,       n // 3  ):
  # Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c
  __a			:  List[Any]		    =  (n * n - 2 * a * n) // (2 * n - 2 * a)
  __a			:  Union[str, Any]		    =  n - a - b
  if c * c == (a * a + b * b):
   __a			:  Union[str, Any]		    =  a * b * c
   if candidate >= product:
    __a			:  List[Any]		    =  candidate
 return product


if __name__ == "__main__":
      print(F"""{solution() = }""")
