



def  _snake_case			(							__snake_case     )  ->  List[Any]:






      '''simple docstring'''







      if not isinstance(_lowercase       ,	_lowercase     ):
            raise ValueError("Input series is not valid, valid series - [2, 4, 8]"     )
      if len(_lowercase     ) == 0:
            raise ValueError("Input list must be a non empty list"     )
      if len(_lowercase     ) == 1:
            return True
      try:
            UpperCAmelCase_	:						Optional[Any]					   =		series[1] / series[0]
            for index in range(len(_lowercase     ) - 1     ):
                  if series[index + 1] / series[index] != common_ratio:
                        return False
      except ZeroDivisionError:
            return False
      return True







def  _snake_case			(							__snake_case     )  ->  Dict:






      '''simple docstring'''







      if not isinstance(_lowercase       ,	_lowercase     ):
            raise ValueError("Input series is not valid, valid series - [2, 4, 8]"     )
      if len(_lowercase     ) == 0:
            raise ValueError("Input list must be a non empty list"     )
      UpperCAmelCase_	:						Tuple					   =		1
      for value in series:
            answer *= value
      return pow(_lowercase       ,	1 / len(_lowercase     )     )


if __name__ == "__main__":
   import doctest

   doctest.testmod()





"""simple docstring"""
import os
def   A_    (     ):







						'''simple docstring'''


						snake_case_					:Optional[Any]		=     os.path.dirname(os.path.realpath(_lowercase      )      )
						snake_case_					:int		=     os.path.join(_lowercase,   """triangle.txt"""      )

						with open(_lowercase      ) as in_file:
												snake_case_					:List[Any]		=     [[int(_lowercase      ) for i in line.split()] for line in in_file]

						while len(_lowercase      ) != 1:
												snake_case_					:str		=     triangle.pop()
												snake_case_					:int		=     triangle[-1]
												for j in range(len(_lowercase      ) - 1      ):
																		curr_row[j] += max(last_row[j],   last_row[j + 1]      )
						return triangle[0][0]


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