






from __future__ import annotations

import sys

def   snake_case					(UpperCAmelCase__	,    UpperCAmelCase__  )       ->				tuple[int, int]:


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

  UpperCamelCase_:					Tuple          =				a, b
  UpperCamelCase_:					List[str]          =				1, 0
  UpperCamelCase_:					Optional[Any]          =				0, 1

  while remainder != 0:
    UpperCamelCase_:					int          =				old_remainder // remainder
    UpperCamelCase_:					Tuple          =				remainder, old_remainder - quotient * remainder
    UpperCamelCase_:					Optional[Any]          =				coeff_a, old_coeff_a - quotient * coeff_a
    UpperCamelCase_:					Dict          =				coeff_b, old_coeff_b - quotient * coeff_b

  # sign correction for negative numbers
  if a < 0:
    UpperCamelCase_:					Optional[Any]          =				-old_coeff_a
  if b < 0:
    UpperCamelCase_:					int          =				-old_coeff_b

  return old_coeff_a, old_coeff_b

def   snake_case					()       ->				str:


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


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

'''simple docstring'''
from __future__ import annotations

import sys




def 					_UpperCamelCase		(    SCREAMING_SNAKE_CASE__      ,    SCREAMING_SNAKE_CASE__       )   ->				tuple[int, int]:


		'''simple docstring'''


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

		snake_case       ,snake_case   :    Tuple			       =		a, b
		snake_case       ,snake_case   :    List[str]			       =		1, 0
		snake_case       ,snake_case   :    Optional[Any]			       =		0, 1

		while remainder != 0:
				snake_case   :    int			       =		old_remainder // remainder
				snake_case       ,snake_case   :    Tuple			       =		remainder, old_remainder - quotient * remainder
				snake_case       ,snake_case   :    Optional[Any]			       =		coeff_a, old_coeff_a - quotient * coeff_a
				snake_case       ,snake_case   :    Dict			       =		coeff_b, old_coeff_b - quotient * coeff_b

		# sign correction for negative numbers
		if a < 0:
				snake_case   :    Optional[Any]			       =		-old_coeff_a
		if b < 0:
				snake_case   :    int			       =		-old_coeff_b

		return old_coeff_a, old_coeff_b




def 					_UpperCamelCase		(    )   ->				str:


		'''simple docstring'''


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


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


