




"""simple docstring"""




from __future__ import annotations

import sys
def     A_	(						snake_case_   :				int  ,snake_case_   :				int			):







    '''simple docstring'''





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

    UpperCamelCase :      List[str]      				=							a, b
    UpperCamelCase :      List[str]      				=							1, 0
    UpperCamelCase :      str      				=							0, 1

    while remainder != 0:
        UpperCamelCase :      Optional[int]      				=							old_remainder // remainder
        UpperCamelCase :      Optional[int]      				=							remainder, old_remainder - quotient * remainder
        UpperCamelCase :      Dict      				=							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 :      str      				=							-old_coeff_a
    if b < 0:
        UpperCamelCase :      Union[str, Any]      				=							-old_coeff_b

    return old_coeff_a, old_coeff_b
def     A_	(						):







    '''simple docstring'''





    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(lowerCamelCase_  ,lowerCamelCase_			)			)
    return 0


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





'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


snake_case__     :			Optional[Any]      			=  {'''configuration_nat''': ['''NAT_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''NatConfig''']}


try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 snake_case__     :			Tuple      			=  [
     '''NAT_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''NatForImageClassification''',
     '''NatModel''',
     '''NatPreTrainedModel''',
     '''NatBackbone''',
 ]

if TYPE_CHECKING:
 from .configuration_nat import NAT_PRETRAINED_CONFIG_ARCHIVE_MAP, NatConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_nat import (
      NAT_PRETRAINED_MODEL_ARCHIVE_LIST,
      NatBackbone,
      NatForImageClassification,
      NatModel,
      NatPreTrainedModel,
  )

else:
 import sys

 snake_case__     :			int      			=  _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)






