



from __future__ import annotations
def        A_  (      _lowercase, _lowercase, _lowercase     ):







						'''simple docstring'''


						assert (
						    c % greatest_common_divisor(_lowercase, _lowercase     ) == 0
						)  # greatest_common_divisor(a,b) function implemented below
						(snake_case_)			:str						=      extended_gcd(_lowercase, _lowercase     )  # extended_gcd(a,b) function implemented below
						snake_case_			:List[Any]						=      c / d
						return (r * x, r * y)
def        A_  (      _lowercase, _lowercase, _lowercase, _lowercase = 2     ):







						'''simple docstring'''


						(snake_case_)			:int						=      diophantine(_lowercase, _lowercase, _lowercase     )  # Initial value
						snake_case_			:Optional[int]						=      greatest_common_divisor(_lowercase, _lowercase     )
						snake_case_			:int						=      a // d
						snake_case_			:int						=      b // d

						for i in range(_lowercase     ):
												snake_case_			:List[str]						=      xa + i * q
												snake_case_			:Any						=      ya - i * p
												print(_lowercase, _lowercase     )
def        A_  (      _lowercase, _lowercase     ):







						'''simple docstring'''


						if a < b:
												snake_case_			:Optional[int]						=      b, a

						while a % b != 0:
												snake_case_			:Union[str, Any]						=      b, a % b

						return b
def        A_  (      _lowercase, _lowercase     ):







						'''simple docstring'''


						assert a >= 0 and b >= 0

						if b == 0:
												snake_case_			:Tuple						=      a, 1, 0
						else:
												(snake_case_)			:Tuple						=      extended_gcd(_lowercase, a % b     )
												snake_case_			:Optional[Any]						=      q
												snake_case_			:Any						=      p - q * (a // b)

						assert a % d == 0 and b % d == 0
						assert d == a * x + b * y

						return (d, x, y)


if __name__ == "__main__":
						from doctest import testmod

						testmod(name="diophantine", verbose=True)
						testmod(name="diophantine_all_soln", verbose=True)
						testmod(name="extended_gcd", verbose=True)
						testmod(name="greatest_common_divisor", verbose=True)





"""simple docstring"""
from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_sentencepiece_available, is_torch_available


__a     =    {
    "configuration_xlm_prophetnet": ["XLM_PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP", "XLMProphetNetConfig"],
}

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

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						__a     =    [
						    "XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST",
						    "XLMProphetNetDecoder",
						    "XLMProphetNetEncoder",
						    "XLMProphetNetForCausalLM",
						    "XLMProphetNetForConditionalGeneration",
						    "XLMProphetNetModel",
						    "XLMProphetNetPreTrainedModel",
						]


if TYPE_CHECKING:
						from .configuration_xlm_prophetnet import XLM_PROPHETNET_PRETRAINED_CONFIG_ARCHIVE_MAP, XLMProphetNetConfig

						try:
												if not is_sentencepiece_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .tokenization_xlm_prophetnet import XLMProphetNetTokenizer

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_xlm_prophetnet import (
												    XLM_PROPHETNET_PRETRAINED_MODEL_ARCHIVE_LIST,
												    XLMProphetNetDecoder,
												    XLMProphetNetEncoder,
												    XLMProphetNetForCausalLM,
												    XLMProphetNetForConditionalGeneration,
												    XLMProphetNetModel,
												    XLMProphetNetPreTrainedModel,
												)

else:
						import sys

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