





"""simple docstring"""




def 		UpperCAmelCase__						(	_UpperCAmelCase					,   _UpperCAmelCase   ):






  """simple docstring"""





  if n == 0:
    return 1

  elif n % 2 == 1:
    return binary_exponentiation(_UpperCAmelCase					,   n - 1   ) * a

  else:
    A_    :			str									=    binary_exponentiation(_UpperCAmelCase					,   n / 2   )
    return b * b


if __name__ == "__main__":
   try:
      lowerCamelCase_	:		List[str]         =   int(input('Enter Base : ').strip())
      lowerCamelCase_	:		Optional[int]         =   int(input('Enter Power : ').strip())
   except ValueError:
      print('Invalid literal for integer')

   lowerCamelCase_	:		Optional[int]         =   binary_exponentiation(BASE, POWER)
   print(F"{BASE}^({POWER}) : {RESULT}")



"""simple docstring"""






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


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


if __name__ == "__main__":
	import doctest

	doctest.testmod()
