'''simple docstring'''




def 							lowerCamelCase			(   UpperCAmelCase__ :      list[int]   ,   UpperCAmelCase__ :      list[int]				)    ->   tuple[float, float]:

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

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






'''simple docstring'''




from __future__ import annotations




def 							lowerCamelCase			(   UpperCAmelCase__ :      list   ,   UpperCAmelCase__ :      int | None = None   ,   UpperCAmelCase__ :      int | None = None				)    ->   None:
							if start is None:
														lowercase_      :    Any       		= 0

							if end is None:
														lowercase_      :    List[Any]       		= len(UpperCAmelCase__				) - 1

							if start >= end:
														return

							lowercase_      :    Optional[int]       		= (start + end) // 2

							slowsort(UpperCAmelCase__   ,   UpperCAmelCase__   ,   UpperCAmelCase__				)
							slowsort(UpperCAmelCase__   ,   mid + 1   ,   UpperCAmelCase__				)

							if sequence[end] < sequence[mid]:
														lowercase_		,		lowercase_      :    Dict       		= sequence[mid], sequence[end]

							slowsort(UpperCAmelCase__   ,   UpperCAmelCase__   ,   end - 1				)


if __name__ == "__main__":
						from doctest import testmod

						testmod()





