


from __future__ import annotations
def 							UpperCamelCase_  (				__snake_case			:						int	,			__snake_case			:						int	,			__snake_case			:						int     )->      tuple[float, float]:




						'''simple docstring'''
						assert (
						    c % greatest_common_divisor(__snake_case	,			__snake_case     ) == 0
						)  # greatest_common_divisor(a,b) function implemented below
						((__magic_name__)		,			(__magic_name__)		,			(__magic_name__)) 		=			extended_gcd(__snake_case	,			__snake_case     )  # extended_gcd(a,b) function implemented below
						__magic_name__ 		=			c / d
						return (r * x, r * y)
def 							UpperCamelCase_  (				__snake_case			:						int	,			__snake_case			:						int	,			__snake_case			:						int	,			__snake_case			:						int = 2     )->      None:




						'''simple docstring'''
						((__magic_name__)		,			(__magic_name__)) 		=			diophantine(__snake_case	,			__snake_case	,			__snake_case     )  # Initial value
						__magic_name__ 		=			greatest_common_divisor(__snake_case	,			__snake_case     )
						__magic_name__ 		=			a // d
						__magic_name__ 		=			b // d

						for i in range(__snake_case     ):
												__magic_name__ 		=			xa + i * q
												__magic_name__ 		=			ya - i * p
												print(__snake_case	,			__snake_case     )
def 							UpperCamelCase_  (				__snake_case			:						int	,			__snake_case			:						int     )->      int:




						'''simple docstring'''
						if a < b:
												__magic_name__		,			__magic_name__ 		=			b, a

						while a % b != 0:
												__magic_name__		,			__magic_name__ 		=			b, a % b

						return b
def 							UpperCamelCase_  (				__snake_case			:						int	,			__snake_case			:						int     )->      tuple[int, int, int]:




						'''simple docstring'''
						assert a >= 0 and b >= 0

						if b == 0:
												__magic_name__		,			__magic_name__		,			__magic_name__ 		=			a, 1, 0
						else:
												((__magic_name__)		,			(__magic_name__)		,			(__magic_name__)) 		=			extended_gcd(__snake_case	,			a % b     )
												__magic_name__ 		=			q
												__magic_name__ 		=			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_tokenizers_available,
    is_torch_available,
)


UpperCamelCase :				str						    =       {
    '''configuration_bart''': ['''BART_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''BartConfig''', '''BartOnnxConfig'''],
    '''tokenization_bart''': ['''BartTokenizer'''],
}

try:
					if not is_tokenizers_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase :				Optional[int]						    =       ['''BartTokenizerFast''']

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase :				Any						    =       [
					    '''BART_PRETRAINED_MODEL_ARCHIVE_LIST''',
					    '''BartForCausalLM''',
					    '''BartForConditionalGeneration''',
					    '''BartForQuestionAnswering''',
					    '''BartForSequenceClassification''',
					    '''BartModel''',
					    '''BartPretrainedModel''',
					    '''PretrainedBartModel''',
					]

try:
					if not is_tf_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase :				Tuple						    =       [
					    '''TFBartForConditionalGeneration''',
					    '''TFBartForSequenceClassification''',
					    '''TFBartModel''',
					    '''TFBartPretrainedModel''',
					]

try:
					if not is_flax_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					UpperCamelCase :				List[Any]						    =       [
					    '''FlaxBartDecoderPreTrainedModel''',
					    '''FlaxBartForCausalLM''',
					    '''FlaxBartForConditionalGeneration''',
					    '''FlaxBartForQuestionAnswering''',
					    '''FlaxBartForSequenceClassification''',
					    '''FlaxBartModel''',
					    '''FlaxBartPreTrainedModel''',
					]

if TYPE_CHECKING:
					from .configuration_bart import BART_PRETRAINED_CONFIG_ARCHIVE_MAP, BartConfig, BartOnnxConfig
					from .tokenization_bart import BartTokenizer

					try:
										if not is_tokenizers_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .tokenization_bart_fast import BartTokenizerFast

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_bart import (
										    BART_PRETRAINED_MODEL_ARCHIVE_LIST,
										    BartForCausalLM,
										    BartForConditionalGeneration,
										    BartForQuestionAnswering,
										    BartForSequenceClassification,
										    BartModel,
										    BartPretrainedModel,
										    PretrainedBartModel,
										)

					try:
										if not is_tf_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_tf_bart import (
										    TFBartForConditionalGeneration,
										    TFBartForSequenceClassification,
										    TFBartModel,
										    TFBartPretrainedModel,
										)

					try:
										if not is_flax_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flax_bart import (
										    FlaxBartDecoderPreTrainedModel,
										    FlaxBartForCausalLM,
										    FlaxBartForConditionalGeneration,
										    FlaxBartForQuestionAnswering,
										    FlaxBartForSequenceClassification,
										    FlaxBartModel,
										    FlaxBartPreTrainedModel,
										)

else:
					import sys

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

