






from __future__ import annotations



def        _lowerCamelCase(      lowerCAmelCase__					:		int     ,     lowerCAmelCase__					:		int     ,     lowerCAmelCase__					:		int   ):





				'''simple docstring'''







				assert (
				    c % greatest_common_divisor(lowerCAmelCase__     ,     lowerCAmelCase__   ) == 0
				)  # greatest_common_divisor(a,b) function implemented below
				((SCREAMING_SNAKE_CASE_)				,							(SCREAMING_SNAKE_CASE_)				,							(SCREAMING_SNAKE_CASE_)) :						Union[str, Any]    				= extended_gcd(lowerCAmelCase__     ,     lowerCAmelCase__   )  # extended_gcd(a,b) function implemented below
				SCREAMING_SNAKE_CASE_ :						List[Any]    				= c / d
				return (r * x, r * y)



def        _lowerCamelCase(      lowerCAmelCase__					:		int     ,     lowerCAmelCase__					:		int     ,     lowerCAmelCase__					:		int     ,     lowerCAmelCase__					:		int = 2   ):





				'''simple docstring'''







				((SCREAMING_SNAKE_CASE_)				,							(SCREAMING_SNAKE_CASE_)) :						List[str]    				= diophantine(lowerCAmelCase__     ,     lowerCAmelCase__     ,     lowerCAmelCase__   )  # Initial value
				SCREAMING_SNAKE_CASE_ :						Optional[int]    				= greatest_common_divisor(lowerCAmelCase__     ,     lowerCAmelCase__   )
				SCREAMING_SNAKE_CASE_ :						Union[str, Any]    				= a // d
				SCREAMING_SNAKE_CASE_ :						List[Any]    				= b // d

				for i in range(lowerCAmelCase__   ):
								SCREAMING_SNAKE_CASE_ :						Optional[int]    				= xa + i * q
								SCREAMING_SNAKE_CASE_ :						Tuple    				= ya - i * p
								print(lowerCAmelCase__     ,     lowerCAmelCase__   )



def        _lowerCamelCase(      lowerCAmelCase__					:		int     ,     lowerCAmelCase__					:		int   ):





				'''simple docstring'''







				if a < b:
								SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_ :						Optional[Any]    				= b, a

				while a % b != 0:
								SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_ :						List[Any]    				= b, a % b

				return b



def        _lowerCamelCase(      lowerCAmelCase__					:		int     ,     lowerCAmelCase__					:		int   ):





				'''simple docstring'''







				assert a >= 0 and b >= 0

				if b == 0:
								SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_				,							SCREAMING_SNAKE_CASE_ :						str    				= a, 1, 0
				else:
								((SCREAMING_SNAKE_CASE_)				,							(SCREAMING_SNAKE_CASE_)				,							(SCREAMING_SNAKE_CASE_)) :						Optional[int]    				= extended_gcd(lowerCAmelCase__     ,     a % b   )
								SCREAMING_SNAKE_CASE_ :						int    				= q
								SCREAMING_SNAKE_CASE_ :						Optional[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_torch_available, is_vision_available


A										=      {'configuration_detr': ['DETR_PRETRAINED_CONFIG_ARCHIVE_MAP', 'DetrConfig', 'DetrOnnxConfig']}

try:
				if not is_vision_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				A										=      ['DetrFeatureExtractor']
				A										=      ['DetrImageProcessor']

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				A										=      [
				    'DETR_PRETRAINED_MODEL_ARCHIVE_LIST',
				    'DetrForObjectDetection',
				    'DetrForSegmentation',
				    'DetrModel',
				    'DetrPreTrainedModel',
				]


if TYPE_CHECKING:
				from .configuration_detr import DETR_PRETRAINED_CONFIG_ARCHIVE_MAP, DetrConfig, DetrOnnxConfig

				try:
								if not is_vision_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .feature_extraction_detr import DetrFeatureExtractor
								from .image_processing_detr import DetrImageProcessor

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_detr import (
								    DETR_PRETRAINED_MODEL_ARCHIVE_LIST,
								    DetrForObjectDetection,
								    DetrForSegmentation,
								    DetrModel,
								    DetrPreTrainedModel,
								)

else:
				import sys

				A										=      _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)