


from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


_snake_case				=			{
    "configuration_ernie_m": ["ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP", "ErnieMConfig"],
}

try:
      if not is_sentencepiece_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      _snake_case				=			["ErnieMTokenizer"]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      _snake_case				=			[
          "ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST",
          "ErnieMForMultipleChoice",
          "ErnieMForQuestionAnswering",
          "ErnieMForSequenceClassification",
          "ErnieMForTokenClassification",
          "ErnieMModel",
          "ErnieMPreTrainedModel",
          "ErnieMForInformationExtraction",
      ]


if TYPE_CHECKING:
      from .configuration_ernie_m import ERNIE_M_PRETRAINED_CONFIG_ARCHIVE_MAP, ErnieMConfig

      try:
            if not is_sentencepiece_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_ernie_m import ErnieMTokenizer

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_ernie_m import (
                ERNIE_M_PRETRAINED_MODEL_ARCHIVE_LIST,
                ErnieMForInformationExtraction,
                ErnieMForMultipleChoice,
                ErnieMForQuestionAnswering,
                ErnieMForSequenceClassification,
                ErnieMForTokenClassification,
                ErnieMModel,
                ErnieMPreTrainedModel,
            )


else:
      import sys

      _snake_case				=			_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)







from __future__ import annotations

import sys







def 	A (		A__		,		A__			):
     # base cases
     if abs(A__			) == 1:
          return a, 0
     elif abs(A__			) == 1:
          return 0, b

     UpperCAmelCase	,			UpperCAmelCase    :					Any			=      a, b
     UpperCAmelCase	,			UpperCAmelCase    :					List[Any]			=      1, 0
     UpperCAmelCase	,			UpperCAmelCase    :					Union[str, Any]			=      0, 1

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

     # sign correction for negative numbers
     if a < 0:
          UpperCAmelCase    :					Union[str, Any]			=      -old_coeff_a
     if b < 0:
          UpperCAmelCase    :					int			=      -old_coeff_b

     return old_coeff_a, old_coeff_b







def 	A (		):
     if len(sys.argv			) < 3:
          print("2 integer arguments required"			)
          return 1
     UpperCAmelCase    :					Union[str, Any]			=      int(sys.argv[1]			)
     UpperCAmelCase    :					Any			=      int(sys.argv[2]			)
     print(extended_euclidean_algorithm(A__		,		A__			)			)
     return 0


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



