"""simple docstring"""






from __future__ import annotations

import sys



def     a_		(   lowerCamelCase   ,     lowerCamelCase			):
				# base cases
				if abs(lowerCamelCase			) == 1:
								return a, 0
				elif abs(lowerCamelCase			) == 1:
								return 0, b

				UpperCAmelCase__ ,      UpperCAmelCase__			 =				a, b
				UpperCAmelCase__ ,      UpperCAmelCase__			 =				1, 0
				UpperCAmelCase__ ,      UpperCAmelCase__			 =				0, 1

				while remainder != 0:
								UpperCAmelCase__			 =				old_remainder // remainder
								UpperCAmelCase__ ,      UpperCAmelCase__			 =				remainder, old_remainder - quotient * remainder
								UpperCAmelCase__ ,      UpperCAmelCase__			 =				coeff_a, old_coeff_a - quotient * coeff_a
								UpperCAmelCase__ ,      UpperCAmelCase__			 =				coeff_b, old_coeff_b - quotient * coeff_b

				# sign correction for negative numbers
				if a < 0:
								UpperCAmelCase__			 =				-old_coeff_a
				if b < 0:
								UpperCAmelCase__			 =				-old_coeff_b

				return old_coeff_a, old_coeff_b



def     a_		(   ):
				if len(sys.argv			) < 3:
								print('2 integer arguments required'			)
								return 1
				UpperCAmelCase__			 =				int(sys.argv[1]			)
				UpperCAmelCase__			 =				int(sys.argv[2]			)
				print(extended_euclidean_algorithm(lowerCamelCase   ,     lowerCamelCase			)			)
				return 0


if __name__ == "__main__":
						raise SystemExit(main())




"""simple docstring"""






import requests

try:
						from django.contrib.auth import authenticate, login
						from django.shortcuts import redirect, render
except ImportError:
						lowerCAmelCase__    :    Union[str, Any]			=      print



def     a_		(   lowerCamelCase			):
				# Enter your recaptcha secret key here
				UpperCAmelCase__			 =				'secretKey'
				UpperCAmelCase__			 =				'https://www.google.com/recaptcha/api/siteverify'

				# when method is not POST, direct user to login page
				if request.method != "POST":
								return render(lowerCamelCase   ,     'login.html'			)

				# from the frontend, get username, password, and client_key
				UpperCAmelCase__			 =				request.POST.get('username'			)
				UpperCAmelCase__			 =				request.POST.get('password'			)
				UpperCAmelCase__			 =				request.POST.get('g-recaptcha-response'			)

				# post recaptcha response to Google's recaptcha api
				UpperCAmelCase__			 =				requests.post(lowerCamelCase   ,     data={'secret': secret_key, 'response': client_key}			)
				# if the recaptcha api verified our keys
				if response.json().get('success'   ,     lowerCamelCase			):
								# authenticate the user
								UpperCAmelCase__			 =				authenticate(lowerCamelCase   ,     username=lowerCamelCase   ,     password=lowerCamelCase			)
								if user_in_database:
												login(lowerCamelCase   ,     lowerCamelCase			)
												return redirect('/your-webpage'			)
				return render(lowerCamelCase   ,     'login.html'			)



