
"""simple docstring"""




from __future__ import annotations

from typing import Any




class        SCREAMING_SNAKE_CASE__					:





	'''simple docstring'''



	def __init__(  self     :   Any      ,  lowercase     :   int = 6     ):


				'''simple docstring'''


				_snake_case          =      None
				_snake_case          =      None
				self.create_linked_list(_lowerCamelCase     )



	def 			A							(  self     :   str      ,  lowercase     :   int     ):


				'''simple docstring'''


				_snake_case          =      Node()
				_snake_case          =      current_node
				_snake_case          =      current_node
				_snake_case          =      current_node
				for _ in range(1      ,  _lowerCamelCase     ):
							_snake_case          =      Node()
							_snake_case          =      current_node
							_snake_case          =      previous_node
							_snake_case          =      current_node
				_snake_case          =      self.front
				_snake_case          =      previous_node



	def 			A							(  self     :   Dict     ):


				'''simple docstring'''


				return (
				    self.front == self.rear
				    and self.front is not None
				    and self.front.data is None
				)



	def 			A							(  self     :   Optional[int]     ):


				'''simple docstring'''


				self.check_can_perform_operation()
				return self.front.data if self.front else None



	def 			A							(  self     :   Optional[Any]      ,  lowercase     :   Any     ):


				'''simple docstring'''


				if self.rear is None:
							return

				self.check_is_full()
				if not self.is_empty():
							_snake_case          =      self.rear.next
				if self.rear:
							_snake_case          =      data



	def 			A							(  self     :   Optional[Any]     ):


				'''simple docstring'''


				self.check_can_perform_operation()
				if self.rear is None or self.front is None:
							return None
				if self.front == self.rear:
							_snake_case          =      self.front.data
							_snake_case          =      None
							return data

				_snake_case          =      self.front
				_snake_case          =      old_front.next
				_snake_case          =      old_front.data
				_snake_case          =      None
				return data



	def 			A							(  self     :   int     ):


				'''simple docstring'''


				if self.is_empty():
							raise Exception('Empty Queue'     )





	def 			A							(  self     :   List[Any]     ):


				'''simple docstring'''


				if self.rear and self.rear.next == self.front:
							raise Exception('Full Queue'     )




class        SCREAMING_SNAKE_CASE__					:





	'''simple docstring'''



	def __init__(  self     :   str     ):


				'''simple docstring'''


				_snake_case          =      None
				_snake_case          =      None
				_snake_case          =      None


if __name__ == "__main__":
			import doctest

			doctest.testmod()

def 	a_		(	__lowercase       :     list[int]	, __lowercase       :     list[int]			)			->  tuple[float, float]:

			# Check if the input is valid
			if not len(__lowercase			) == len(__lowercase			) == 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
			_snake_case     , _snake_case     , _snake_case          =      equationa
			_snake_case     , _snake_case     , _snake_case          =      equationa

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