



"""simple docstring"""


from __future__ import annotations

import sys

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

						UpperCAmelCase ,       UpperCAmelCase			 =					a, b
						UpperCAmelCase ,       UpperCAmelCase			 =					1, 0
						UpperCAmelCase ,       UpperCAmelCase			 =					0, 1

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

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

						return old_coeff_a, old_coeff_b

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


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







'''simple docstring'''







from typing import List

from tokenizers import NormalizedString, PreTokenizedString, normalizers
class  SCREAMING_SNAKE_CASE__       :
	def __init__(				self  ,    __UpperCamelCase			):



					'''simple docstring'''






					__a       :     Union[str, Any]								=	vocab
					__a       :     int								=	normalizers.BertNormalizer(
					    clean_text=__UpperCamelCase  ,    handle_chinese_chars=__UpperCamelCase  ,    strip_accents=__UpperCamelCase  ,    lowercase=__UpperCamelCase  ,    )
					try:
									import rjieba
					except ImportError:
									raise ImportError(
									    """You need to install rjieba to use RoFormerTokenizer. """
									    """See https://pypi.org/project/rjieba/ for installation."""			)
					__a       :     Optional[Any]								=	rjieba
	def __lowerCamelCase    (				self  ,    __UpperCamelCase  ,    __UpperCamelCase			):



					'''simple docstring'''






					__a       :     Union[str, Any]								=	[]

					# this code slice normalized_string is too slow (6s) but test_alignement_methods can pass
					for token, start, end in self.jieba.tokenize(str(__UpperCamelCase			)  ,    hmm=__UpperCamelCase			):
									if token in self.vocab:
													splits.append(normalized_string[start:end]			)
									else:
													__a       :     str								=	self.normalizers.normalize_str(__UpperCamelCase			).split()
													for token in token_list:
																	if token:
																					__a       :     str								=	start + len(__UpperCamelCase			)
																					splits.append(normalized_string[start:end]			)
																					__a       :     Union[str, Any]								=	end

        # this code test_alignement_methods can't pass but fast (300ms)
        # for token in self.jieba.cut(str(normalized_string), False):
        #     if token in self.vocab:
        #         splits.append(NormalizedString(token))
        #     else:
        #         token_list = self.normalizers.normalize_str(token).split()
        #         for token in token_list:
        #             if token:
        #                 splits.append(NormalizedString(token))

					return splits

	def __lowerCamelCase    (				self  ,    __UpperCamelCase			):



					'''simple docstring'''






					pretok.split(self.jieba_split			)