



"""simple docstring"""

from __future__ import annotations

from math import pi

# Define the Reduced Planck Constant ℏ (H bar), speed of light C, value of
# Pi and the function
lowercase__			   =  1.054_571_817e-34  # unit of ℏ : J * s

lowercase__			   =  3e8  # unit of c : m * s^-1





def       __magic_name__    (   _lowerCamelCase				: float  ,       _lowerCamelCase				: float  ,       _lowerCamelCase				: float					):

							if (force, area, distance).count(0					) != 1:
														raise ValueError("""One and only one argument must be 0"""					)
							if force < 0:
														raise ValueError("""Magnitude of force can not be negative"""					)
							if distance < 0:
														raise ValueError("""Distance can not be negative"""					)
							if area < 0:
														raise ValueError("""Area can not be negative"""					)
							if force == 0:
														__a		:		int									=       (REDUCED_PLANCK_CONSTANT * SPEED_OF_LIGHT * pi**2 * area) / (
														    2_4_0 * (distance) ** 4
														)
														return {"force": force}
							elif area == 0:
														__a		:		int									=       (2_4_0 * force * (distance) ** 4) / (
														    REDUCED_PLANCK_CONSTANT * SPEED_OF_LIGHT * pi**2
														)
														return {"area": area}
							elif distance == 0:
														__a		:		Dict									=       (
														    (REDUCED_PLANCK_CONSTANT * SPEED_OF_LIGHT * pi**2 * area) / (2_4_0 * force)
														) ** (1 / 4)
														return {"distance": distance}
							raise ValueError("""One and only one argument must be 0"""					)


# Run doctest
if __name__ == "__main__":
	import doctest

	doctest.testmod()






"""simple docstring"""

import os





def       __magic_name__    (   _lowerCamelCase				: Dict					):
							__a		:		List[str]									=       len(grid[0]					)
							__a		:		int									=       len(_lowerCamelCase					)

							__a		:		Tuple									=       0
							__a		:		List[Any]									=       0
							__a		:		List[str]									=       0

							# Check vertically, horizontally, diagonally at the same time (only works
							# for nxn grid)
							for i in range(_lowerCamelCase					):
														for j in range(n_rows - 3					):
																					__a		:		List[Any]									=       grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
																					__a		:		Tuple									=       grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

																					# Left-to-right diagonal (\) product
																					if i < n_columns - 3:
																												__a		:		List[Any]									=       (
																												    grid[i][j]
																												    * grid[i + 1][j + 1]
																												    * grid[i + 2][j + 2]
																												    * grid[i + 3][j + 3]
																												)

																					# Right-to-left diagonal(/) product
																					if i > 2:
																												__a		:		List[Any]									=       (
																												    grid[i][j]
																												    * grid[i - 1][j + 1]
																												    * grid[i - 2][j + 2]
																												    * grid[i - 3][j + 3]
																												)

																					__a		:		str									=       max(
																					    _lowerCamelCase  ,       _lowerCamelCase  ,       _lowerCamelCase  ,       _lowerCamelCase					)
																					if max_product > largest:
																												__a		:		Optional[Any]									=       max_product

							return largest





def       __magic_name__    (   ):
							__a		:		Tuple									=       []
							with open(os.path.dirname(_lowerCamelCase					) + """/grid.txt"""					) as file:
														for line in file:
																					grid.append(line.strip("""\n"""					).split(""" """					)					)

							__a		:		Tuple									=       [[int(_lowerCamelCase					) for i in grid[j]] for j in range(len(_lowerCamelCase					)					)]

							return largest_product(_lowerCamelCase					)


if __name__ == "__main__":
	print(solution())

