def     UpperCamelCase						(	__lowercase						:			list[int]						,__lowercase						:			list[int]     ):
		'''simple docstring'''




		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
		A_       ,      A_       ,      A_		:    Tuple         =				equationa
		A_       ,      A_       ,      A_		:    Optional[Any]         =				equationa

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







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_vision_available


_UpperCAmelCase            =		{
    """configuration_bridgetower""": [
        """BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """BridgeTowerConfig""",
        """BridgeTowerTextConfig""",
        """BridgeTowerVisionConfig""",
    ],
    """processing_bridgetower""": ["""BridgeTowerProcessor"""],
}

try:
	if not is_vision_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_UpperCAmelCase            =		["""BridgeTowerImageProcessor"""]

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_UpperCAmelCase            =		[
	    """BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """BridgeTowerForContrastiveLearning""",
	    """BridgeTowerForImageAndTextRetrieval""",
	    """BridgeTowerForMaskedLM""",
	    """BridgeTowerModel""",
	    """BridgeTowerPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_bridgetower import (
	    BRIDGETOWER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    BridgeTowerConfig,
	    BridgeTowerTextConfig,
	    BridgeTowerVisionConfig,
	)
	from .processing_bridgetower import BridgeTowerProcessor

	try:
		if not is_vision_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .image_processing_bridgetower import BridgeTowerImageProcessor

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_bridgetower import (
		    BRIDGETOWER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    BridgeTowerForContrastiveLearning,
		    BridgeTowerForImageAndTextRetrieval,
		    BridgeTowerForMaskedLM,
		    BridgeTowerModel,
		    BridgeTowerPreTrainedModel,
		)


else:
	import sys

	_UpperCAmelCase            =		_LazyModule(__name__, globals()["""__file__"""], _import_structure)






