
'''simple docstring'''



from __future__ import annotations

_lowercase    =		10


def A				(__lowerCamelCase				:list[int]		):
						_lowerCAmelCase  						=			1
						_lowerCAmelCase  						=			max(__lowerCamelCase		)
						while placement <= max_digit:
												# declare and initialize empty buckets
												_lowerCAmelCase  						=			[[] for _ in range(__lowerCamelCase		)]
												# split list_of_ints between the buckets
												for i in list_of_ints:
																		_lowerCAmelCase  						=			int((i / placement) % RADIX		)
																		buckets[tmp].append(__lowerCamelCase		)
												# put each buckets' contents into list_of_ints
												_lowerCAmelCase  						=			0
												for b in range(__lowerCamelCase		):
																		for i in buckets[b]:
																								_lowerCAmelCase  						=			i
																								a += 1
        # move to next
												placement *= RADIX
						return list_of_ints


if __name__ == "__main__":
						import doctest

						doctest.testmod()


'''simple docstring'''



def A				(__lowerCamelCase				:list[int]			,     __lowerCamelCase				:list[int]		):

						# Check if the input is valid
						if not len(__lowerCamelCase		) == len(__lowerCamelCase		) == 3:
												raise ValueError("""Please enter a valid equation."""		)
						if equationa[0] == equationa[1] == equationa[0] == equationa[1] == 0:
												raise ValueError("""Both a & b of two equations can't be zero."""		)

						# Extract the coefficients
						_lowerCAmelCase						,   _lowerCAmelCase						,   _lowerCAmelCase  						=			equationa
						_lowerCAmelCase						,   _lowerCAmelCase						,   _lowerCAmelCase  						=			equationa

						# Calculate the determinants of the matrices
						_lowerCAmelCase  						=			aa * ba - aa * ba
						_lowerCAmelCase  						=			ca * ba - ca * ba
						_lowerCAmelCase  						=			aa * ca - aa * ca

						# Check if the system of linear equations has a solution (using Cramer's rule)
						if determinant == 0:
												if determinant_x == determinant_y == 0:
																		raise ValueError("""Infinite solutions. (Consistent system)"""		)
												else:
																		raise ValueError("""No solution. (Inconsistent system)"""		)
						else:
												if determinant_x == determinant_y == 0:
																		# Trivial solution (Inconsistent system)
																		return (0.0, 0.0)
												else:
																		_lowerCAmelCase  						=			determinant_x / determinant
																		_lowerCAmelCase  						=			determinant_y / determinant
																		# Non-Trivial Solution (Consistent system)
																		return (x, y)
