

from __future__ import annotations



def    snake_case_(_UpperCamelCase				, _UpperCamelCase				, _UpperCamelCase  )							->			tuple[float, float]:



  """simple docstring"""






  assert (
      c % greatest_common_divisor(_UpperCamelCase				, _UpperCamelCase  ) == 0
  )  # greatest_common_divisor(a,b) function implemented below
  ((_snake_case),  (_snake_case),  (_snake_case))		=							extended_gcd(_UpperCamelCase				, _UpperCamelCase  )  # extended_gcd(a,b) function implemented below
  _snake_case		=							c / d
  return (r * x, r * y)



def    snake_case_(_UpperCamelCase				, _UpperCamelCase				, _UpperCamelCase				, _UpperCamelCase = 2  )							->			None:



  """simple docstring"""






  ((_snake_case),  (_snake_case))		=							diophantine(_UpperCamelCase				, _UpperCamelCase				, _UpperCamelCase  )  # Initial value
  _snake_case		=							greatest_common_divisor(_UpperCamelCase				, _UpperCamelCase  )
  _snake_case		=							a // d
  _snake_case		=							b // d

  for i in range(_UpperCamelCase  ):
    _snake_case		=							xa + i * q
    _snake_case		=							ya - i * p
    print(_UpperCamelCase				, _UpperCamelCase  )



def    snake_case_(_UpperCamelCase				, _UpperCamelCase  )							->			int:



  """simple docstring"""






  if a < b:
    _snake_case,  _snake_case		=							b, a

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

  return b



def    snake_case_(_UpperCamelCase				, _UpperCamelCase  )							->			tuple[int, int, int]:



  """simple docstring"""






  assert a >= 0 and b >= 0

  if b == 0:
    _snake_case,  _snake_case,  _snake_case		=							a, 1, 0
  else:
    ((_snake_case),  (_snake_case),  (_snake_case))		=							extended_gcd(_UpperCamelCase				, a % b  )
    _snake_case		=							q
    _snake_case		=							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 collections import namedtuple

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

__A    	=			{
    '''atm''': from_to(1, 1),
    '''pascal''': from_to(0.000_0098, 10_13_25),
    '''bar''': from_to(0.98_6923, 1.0_1325),
    '''kilopascal''': from_to(0.0098_6923, 101.325),
    '''megapascal''': from_to(9.8_6923, 0.10_1325),
    '''psi''': from_to(0.06_8046, 14.6959),
    '''inHg''': from_to(0.033_4211, 29.9213),
    '''torr''': from_to(0.0013_1579, 7_60),
}



def    snake_case_(_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()

