


"""simple docstring"""
from __future__ import annotations






def 						lowercase				(	_snake_case		: int	,  _snake_case		: int	,  _snake_case		: int	)	->tuple[float, float]:
	"""simple docstring"""





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






def 						lowercase				(	_snake_case		: int	,  _snake_case		: int	,  _snake_case		: int	,  _snake_case		: int = 2	)	->None:
	"""simple docstring"""





	((__snake_case)      ,				(__snake_case))      :		Tuple         =							diophantine(_snake_case	,  _snake_case	,  _snake_case	)  # Initial value
	__snake_case      :		Optional[int]         =							greatest_common_divisor(_snake_case	,  _snake_case	)
	__snake_case      :		Optional[int]         =							a // d
	__snake_case      :		int         =							b // d

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






def 						lowercase				(	_snake_case		: int	,  _snake_case		: int	)	->int:
	"""simple docstring"""





	if a < b:
		__snake_case      ,				__snake_case      :		Any         =							b, a

	while a % b != 0:
		__snake_case      ,				__snake_case      :		Any         =							b, a % b

	return b






def 						lowercase				(	_snake_case		: int	,  _snake_case		: int	)	->tuple[int, int, int]:
	"""simple docstring"""





	assert a >= 0 and b >= 0

	if b == 0:
		__snake_case      ,				__snake_case      ,				__snake_case      :		Tuple         =							a, 1, 0
	else:
		((__snake_case)      ,				(__snake_case)      ,				(__snake_case))      :		Optional[Any]         =							extended_gcd(_snake_case	,  a % b	)
		__snake_case      :		Optional[int]         =							q
		__snake_case      :		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)












import os

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

lowercase     :			Optional[int]     						=	{"""UserAgent""": UserAgent().random}
lowercase     :			Union[str, Any]     						=	"""https://www.mywaifulist.moe/random"""


def      SCREAMING_SNAKE_CASE      (   lowerCAmelCase     ,							lowerCAmelCase       ):
       _UpperCamelCase														=    requests.get(lowerCAmelCase     ,							headers=lowerCAmelCase       )
       with open(lowerCAmelCase     ,							'''wb'''       ) as file:
              file.write(image.content       )


def      SCREAMING_SNAKE_CASE      (   ):
       _UpperCamelCase														=    BeautifulSoup(requests.get(lowerCAmelCase     ,							headers=lowerCAmelCase       ).text     ,							'''html.parser'''       )
       _UpperCamelCase														=    soup.find('''meta'''     ,							attrs={'''property''': '''og:title'''}       ).attrs['''content''']
       _UpperCamelCase														=    soup.find('''meta'''     ,							attrs={'''property''': '''og:image'''}       ).attrs['''content''']
       _UpperCamelCase														=    soup.find('''p'''     ,							id='''description'''       ).get_text()
       _UpperCamelCase							,		_UpperCamelCase														=    os.path.splitext(os.path.basename(lowerCAmelCase       )       )
       _UpperCamelCase														=    title.strip().replace(''' '''     ,							'''_'''       )
       _UpperCamelCase														=    f'''{image_title}{image_extension}'''
       save_image(lowerCAmelCase     ,							lowerCAmelCase       )
       return (title, description, image_title)


if __name__ == "__main__":
       lowercase						,lowercase						,lowercase     :			str     						=	random_anime_character()
       print(F'''{title}\n\n{desc}\n\nImage saved : {image_title}''')






