






"""simple docstring"""
def 							snake_case (  A__      ,A__		):

			# Check if the input is valid
			if not len(A__		) == len(A__		) == 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
			UpperCAmelCase_	,      UpperCAmelCase_	,      UpperCAmelCase_	:					Union[str, Any]     	=   equationa
			UpperCAmelCase_	,      UpperCAmelCase_	,      UpperCAmelCase_	:					Optional[int]     	=   equationa

			# Calculate the determinants of the matrices
			UpperCAmelCase_	:					int     	=   aa * ba - aa * ba
			UpperCAmelCase_	:					Optional[int]     	=   ca * ba - ca * ba
			UpperCAmelCase_	:					List[str]     	=   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:
									UpperCAmelCase_	:					int     	=   determinant_x / determinant
									UpperCAmelCase_	:					Optional[Any]     	=   determinant_y / determinant
									# Non-Trivial Solution (Consistent system)
									return (x, y)









import unittest

from accelerate import debug_launcher
from accelerate.test_utils import require_cpu, test_ops, test_script




@require_cpu
class 		__A   (      unittest.TestCase      ):

						def      A__    (		self :Tuple			):
										'''simple docstring'''

										debug_launcher(test_script.main			)


						def      A__    (		self :Dict			):
										'''simple docstring'''

										debug_launcher(test_ops.main			)




