from __future__ import annotations


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


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int		,    lowercase_:						int		,    lowercase_:						int = 2					):
       ((_UpperCamelCase)    ,   (_UpperCamelCase))  :							int	    =	diophantine(lowercase_		,    lowercase_		,    lowercase_					)  # Initial value
       _UpperCamelCase  :							Optional[Any]	    =	greatest_common_divisor(lowercase_		,    lowercase_					)
       _UpperCamelCase  :							str	    =	a // d
       _UpperCamelCase  :							Dict	    =	b // d

       for i in range(lowercase_					):
              _UpperCamelCase  :							str	    =	xa + i * q
              _UpperCamelCase  :							Optional[int]	    =	ya - i * p
              print(lowercase_		,    lowercase_					)


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       if a < b:
              _UpperCamelCase    ,   _UpperCamelCase  :							Dict	    =	b, a

       while a % b != 0:
              _UpperCamelCase    ,   _UpperCamelCase  :							int	    =	b, a % b

       return b


def SCREAMING_SNAKE_CASE					(  lowercase_:						int		,    lowercase_:						int					):
       assert a >= 0 and b >= 0

       if b == 0:
              _UpperCamelCase    ,   _UpperCamelCase    ,   _UpperCamelCase  :							Dict	    =	a, 1, 0
       else:
              ((_UpperCamelCase)    ,   (_UpperCamelCase)    ,   (_UpperCamelCase))  :							Tuple	    =	extended_gcd(lowercase_		,    a % b					)
              _UpperCamelCase  :							Dict	    =	q
              _UpperCamelCase  :							List[str]	    =	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)










def   _lowercase       (    _UpperCAmelCase					)    ->	bool:
				if not isinstance(_UpperCAmelCase      ,   _UpperCAmelCase					):
								lowerCamelCase									=F"""Input value of [number={number}] must be an integer"""
								raise TypeError(_UpperCAmelCase					)
				if number < 0 or number % 2 == 1:
								return False
				lowerCamelCase									=int(number**0.5					)
				return number == number_sqrt * (number_sqrt + 1)


if __name__ == "__main__":
							import doctest

							doctest.testmod()





