





def 		A_    (					_lowerCAmelCase = 1000					)						->			int:
 UpperCamelCase     : Tuple	     =       -1
 UpperCamelCase     : str	     =       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
  UpperCamelCase     : Optional[Any]	     =       (n * n - 2 * a * n) // (2 * n - 2 * a)
  UpperCamelCase     : int	     =       n - a - b
  if c * c == (a * a + b * b):
   UpperCamelCase     : int	     =       a * b * c
   if candidate >= product:
    UpperCamelCase     : Tuple	     =       candidate
 return product


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







class  A__       :  # Public class to implement a graph





      def __init__(			self	,							A_	,							A_	,							A_       ):
       '''simple docstring'''




       UpperCamelCase     : Optional[int]	     =       row
       UpperCamelCase     : Any	     =       col
       UpperCamelCase     : Optional[Any]	     =       graph





      def 	__UpperCamelCase(			self	,							A_	,							A_	,							A_       ):
       '''simple docstring'''




       return (
           0 <= i < self.ROW
           and 0 <= j < self.COL
           and not visited[i][j]
           and self.graph[i][j]
       )





      def 	__UpperCamelCase(			self	,							A_	,							A_	,							A_       ):
       '''simple docstring'''




       UpperCamelCase     : Any	     =       [-1, -1, -1, 0, 0, 1, 1, 1]  # Coordinate order
       UpperCamelCase     : Dict	     =       [-1, 0, 1, -1, 1, -1, 0, 1]
       UpperCamelCase     : Any	     =       True  # Make those cells visited
       for k in range(8       ):
        if self.is_safe(i + row_nbr[k]	,							j + col_nbr[k]	,							A_       ):
         self.diffs(i + row_nbr[k]	,							j + col_nbr[k]	,							A_       )





      def 	__UpperCamelCase(			self       ):  # And finally, count all islands.
       '''simple docstring'''




       UpperCamelCase     : str	     =       [[False for j in range(self.COL       )] for i in range(self.ROW       )]
       UpperCamelCase     : int	     =       0
       for i in range(self.ROW       ):
        for j in range(self.COL       ):
         if visited[i][j] is False and self.graph[i][j] == 1:
          self.diffs(A_	,							A_	,							A_       )
          count += 1
       return count
