




from __future__ import annotations

def 					A				(				_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )     ->			tuple[float, float]:
       assert (
           c % greatest_common_divisor(_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   ) == 0
       )  # greatest_common_divisor(a,b) function implemented below
       ((lowerCamelCase)			,				(lowerCamelCase)			,				(lowerCamelCase))       :				Optional[int]      			= extended_gcd(_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )  # extended_gcd(a,b) function implemented below
       lowerCamelCase       :				str      			= c / d
       return (r * x, r * y)

def 					A				(				_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE = 2   )     ->			None:
       ((lowerCamelCase)			,				(lowerCamelCase))       :				List[Any]      			= diophantine(_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )  # Initial value
       lowerCamelCase       :				Tuple      			= greatest_common_divisor(_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )
       lowerCamelCase       :				List[Any]      			= a // d
       lowerCamelCase       :				int      			= b // d

       for i in range(_SCREAMING_SNAKE_CASE   ):
              lowerCamelCase       :				int      			= xa + i * q
              lowerCamelCase       :				Optional[Any]      			= ya - i * p
              print(_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )

def 					A				(				_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )     ->			int:
       if a < b:
              lowerCamelCase			,				lowerCamelCase       :				Optional[int]      			= b, a

       while a % b != 0:
              lowerCamelCase			,				lowerCamelCase       :				Dict      			= b, a % b

       return b

def 					A				(				_SCREAMING_SNAKE_CASE			,_SCREAMING_SNAKE_CASE   )     ->			tuple[int, int, int]:
       assert a >= 0 and b >= 0

       if b == 0:
              lowerCamelCase			,				lowerCamelCase			,				lowerCamelCase       :				Union[str, Any]      			= a, 1, 0
       else:
              ((lowerCamelCase)			,				(lowerCamelCase)			,				(lowerCamelCase))       :				Optional[int]      			= extended_gcd(_SCREAMING_SNAKE_CASE			,a % b   )
              lowerCamelCase       :				List[Any]      			= q
              lowerCamelCase       :				int      			= 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)












from typing import TYPE_CHECKING

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


SCREAMING_SNAKE_CASE__	:				Optional[int]  =       {
    'configuration_gptsan_japanese': ['GPTSAN_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP', 'GPTSanJapaneseConfig'],
    'tokenization_gptsan_japanese': ['GPTSanJapaneseTokenizer'],
}

try:
       if not is_torch_available():
              raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
       pass
else:
       SCREAMING_SNAKE_CASE__	:				Optional[int]  =       [
           'GPTSAN_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST',
           'GPTSanJapaneseForConditionalGeneration',
           'GPTSanJapaneseModel',
           'GPTSanJapanesePreTrainedModel',
       ]
       SCREAMING_SNAKE_CASE__	:				List[str]  =       [
           'GPTSanJapaneseTokenizer',
       ]


if TYPE_CHECKING:
       from .configuration_gptsan_japanese import GPTSAN_JAPANESE_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTSanJapaneseConfig
       from .tokenization_gptsan_japanese import GPTSanJapaneseTokenizer

       try:
              if not is_torch_available():
                     raise OptionalDependencyNotAvailable()
       except OptionalDependencyNotAvailable:
              pass
       else:
              from .modeling_gptsan_japanese import (
                  GPTSAN_JAPANESE_PRETRAINED_MODEL_ARCHIVE_LIST,
                  GPTSanJapaneseForConditionalGeneration,
                  GPTSanJapaneseModel,
                  GPTSanJapanesePreTrainedModel,
              )
              from .tokenization_gptsan_japanese import GPTSanJapaneseTokenizer


else:
       import sys

       SCREAMING_SNAKE_CASE__	:				Optional[Any]  =       _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)






