'''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 collections import namedtuple

UpperCamelCase_						   =   namedtuple('from_to', 'from_ to')

UpperCamelCase_						   =   {
    'atm': from_to(1, 1),
    'pascal': from_to(0.0_00_00_98, 101325),
    'bar': from_to(0.98_69_23, 1.0_13_25),
    'kilopascal': from_to(0.00_98_69_23, 1_01.3_25),
    'megapascal': from_to(9.8_69_23, 0.10_13_25),
    'psi': from_to(0.06_80_46, 14.69_59),
    'inHg': from_to(0.0_33_42_11, 29.92_13),
    'torr': from_to(0.00_13_15_79, 760),
}
def    UpperCamelCase						(					UpperCAmelCase ,   UpperCAmelCase ,   UpperCAmelCase     )						->float:

   """simple docstring"""



   if from_type not in PRESSURE_CONVERSION:
      raise ValueError(
          F'''Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'''
          + ", ".join(UpperCAmelCase     )     )
   if to_type not in PRESSURE_CONVERSION:
      raise ValueError(
          F'''Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'''
          + ", ".join(UpperCAmelCase     )     )
   return (
       value * PRESSURE_CONVERSION[from_type].from_ * PRESSURE_CONVERSION[to_type].to
   )


if __name__ == "__main__":
      import doctest

      doctest.testmod()