





def 				__UpperCamelCase  (		snake_case    ,	snake_case     )  ->						Dict:


   '''simple docstring'''







   if n == 0:
      return 1

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

   else:
      __A				 =       binary_exponentiation(snake_case    ,	n / 2     )
      return b * b


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

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








from __future__ import annotations

import sys
def 				__UpperCamelCase  (		snake_case    ,	snake_case     )  ->						tuple[int, int]:


   '''simple docstring'''







   if abs(snake_case     ) == 1:
      return a, 0
   elif abs(snake_case     ) == 1:
      return 0, b

   __A ,						__A				 =       a, b
   __A ,						__A				 =       1, 0
   __A ,						__A				 =       0, 1

   while remainder != 0:
      __A				 =       old_remainder // remainder
      __A ,						__A				 =       remainder, old_remainder - quotient * remainder
      __A ,						__A				 =       coeff_a, old_coeff_a - quotient * coeff_a
      __A ,						__A				 =       coeff_b, old_coeff_b - quotient * coeff_b

   # sign correction for negative numbers
   if a < 0:
      __A				 =       -old_coeff_a
   if b < 0:
      __A				 =       -old_coeff_b

   return old_coeff_a, old_coeff_b
def 				__UpperCamelCase  (		)  ->						Tuple:


   '''simple docstring'''







   if len(sys.argv     ) < 3:
      print('''2 integer arguments required'''     )
      return 1
   __A				 =       int(sys.argv[1]     )
   __A				 =       int(sys.argv[2]     )
   print(extended_euclidean_algorithm(snake_case    ,	snake_case     )     )
   return 0


if __name__ == "__main__":
    raise SystemExit(main())

