





"""simple docstring"""



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


a_				=    {
    """configuration_layoutlm""": ["""LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LayoutLMConfig""", """LayoutLMOnnxConfig"""],
    """tokenization_layoutlm""": ["""LayoutLMTokenizer"""],
}

try:
       if not is_tokenizers_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       a_				=    ["""LayoutLMTokenizerFast"""]

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       a_				=    [
           """LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """LayoutLMForMaskedLM""",
           """LayoutLMForSequenceClassification""",
           """LayoutLMForTokenClassification""",
           """LayoutLMForQuestionAnswering""",
           """LayoutLMModel""",
           """LayoutLMPreTrainedModel""",
       ]

try:
       if not is_tf_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       a_				=    [
           """TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST""",
           """TFLayoutLMForMaskedLM""",
           """TFLayoutLMForSequenceClassification""",
           """TFLayoutLMForTokenClassification""",
           """TFLayoutLMForQuestionAnswering""",
           """TFLayoutLMMainLayer""",
           """TFLayoutLMModel""",
           """TFLayoutLMPreTrainedModel""",
       ]


if TYPE_CHECKING:
       from .configuration_layoutlm import LAYOUTLM_PRETRAINED_CONFIG_ARCHIVE_MAP, LayoutLMConfig, LayoutLMOnnxConfig
       from .tokenization_layoutlm import LayoutLMTokenizer

       try:
              if not is_tokenizers_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .tokenization_layoutlm_fast import LayoutLMTokenizerFast

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_layoutlm import (
                  LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  LayoutLMForMaskedLM,
                  LayoutLMForQuestionAnswering,
                  LayoutLMForSequenceClassification,
                  LayoutLMForTokenClassification,
                  LayoutLMModel,
                  LayoutLMPreTrainedModel,
              )
       try:
              if not is_tf_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_tf_layoutlm import (
                  TF_LAYOUTLM_PRETRAINED_MODEL_ARCHIVE_LIST,
                  TFLayoutLMForMaskedLM,
                  TFLayoutLMForQuestionAnswering,
                  TFLayoutLMForSequenceClassification,
                  TFLayoutLMForTokenClassification,
                  TFLayoutLMMainLayer,
                  TFLayoutLMModel,
                  TFLayoutLMPreTrainedModel,
              )

else:
       import sys

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











"""simple docstring"""



from __future__ import annotations

import sys







def 	__lowercase  (     snake_case_						:						int       ,snake_case_						:						int		)     ->tuple[int, int]:



    '''simple docstring'''







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

    __A				, __A					:		int						=  a, b
    __A				, __A					:		Any						=  1, 0
    __A				, __A					:		int						=  0, 1

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

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

    return old_coeff_a, old_coeff_b







def 	__lowercase  (     )     ->List[str]:



    '''simple docstring'''







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


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




