'''simple docstring'''


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
     ((UpperCAmelCase_)  ,     (UpperCAmelCase_)  ,     (UpperCAmelCase_))				:  Union[str, Any]  = extended_gcd(lowerCamelCase_      ,	lowerCamelCase_  )  # extended_gcd(a,b) function implemented below
     UpperCAmelCase_				:  int  = c / d
     return (r * x, r * y)


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



     """simple docstring"""





     ((UpperCAmelCase_)  ,     (UpperCAmelCase_))				:  Tuple  = diophantine(lowerCamelCase_      ,	lowerCamelCase_      ,	lowerCamelCase_  )  # Initial value
     UpperCAmelCase_				:  Union[str, Any]  = greatest_common_divisor(lowerCamelCase_      ,	lowerCamelCase_  )
     UpperCAmelCase_				:  Dict  = a // d
     UpperCAmelCase_				:  List[str]  = b // d

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


def    _lowerCamelCase       ( lowerCamelCase_   :				int      ,	lowerCamelCase_   :				int  ):



     """simple docstring"""





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

     while a % b != 0:
          UpperCAmelCase_  ,     UpperCAmelCase_				:  Tuple  = b, a % b

     return b


def    _lowerCamelCase       ( lowerCamelCase_   :				int      ,	lowerCamelCase_   :				int  ):



     """simple docstring"""





     assert a >= 0 and b >= 0

     if b == 0:
          UpperCAmelCase_  ,     UpperCAmelCase_  ,     UpperCAmelCase_				:  Optional[int]  = a, 1, 0
     else:
          ((UpperCAmelCase_)  ,     (UpperCAmelCase_)  ,     (UpperCAmelCase_))				:  List[str]  = extended_gcd(lowerCamelCase_      ,	a % b  )
          UpperCAmelCase_				:  Optional[int]  = q
          UpperCAmelCase_				:  List[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_tf_available, is_torch_available


UpperCAmelCase       :		Dict		=				{'configuration_hubert': ['HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP', 'HubertConfig']}

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase       :		Union[str, Any]		=				[
       'HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'HubertForCTC',
       'HubertForSequenceClassification',
       'HubertModel',
       'HubertPreTrainedModel',
   ]


try:
   if not is_tf_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   UpperCAmelCase       :		Optional[int]		=				[
       'TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST',
       'TFHubertForCTC',
       'TFHubertModel',
       'TFHubertPreTrainedModel',
   ]

if TYPE_CHECKING:
   from .configuration_hubert import HUBERT_PRETRAINED_CONFIG_ARCHIVE_MAP, HubertConfig

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_hubert import (
          HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          HubertForCTC,
          HubertForSequenceClassification,
          HubertModel,
          HubertPreTrainedModel,
      )

   try:
      if not is_tf_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_tf_hubert import (
          TF_HUBERT_PRETRAINED_MODEL_ARCHIVE_LIST,
          TFHubertForCTC,
          TFHubertModel,
          TFHubertPreTrainedModel,
      )


else:
   import sys

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


