






"""simple docstring"""
from ..utils import DummyObject, requires_backends







class 			UpperCamelCase_       (metaclass=__A     ):
	__magic_name__	      =				['''onnx''']





	def __init__(      self					: Optional[int]	,	*lowerCAmelCase_					: Dict	,	**lowerCAmelCase_					: Optional[Any]						)						->			List[Any]:
				requires_backends(self	,	["onnx"]						)





	@classmethod
	def      _SCREAMING_SNAKE_CASE      (      cls					: Tuple	,	*lowerCAmelCase_					: List[Any]	,	**lowerCAmelCase_					: List[str]						)						->			Dict:
				requires_backends(cls	,	["onnx"]						)





	@classmethod
	def      _SCREAMING_SNAKE_CASE      (      cls					: Union[str, Any]	,	*lowerCAmelCase_					: Dict	,	**lowerCAmelCase_					: Tuple						)						->			Optional[Any]:
				requires_backends(cls	,	["onnx"]						)











"""simple docstring"""
import os

def 				snake_case      (   ):
			with open(os.path.dirname(A__						) + "/grid.txt"						) as f:
						UpperCAmelCase_     : Any			     =					[]  # noqa: E741
						for _ in range(20						):
									l.append([int(A__						) for x in f.readline().split()]						)

						UpperCAmelCase_     : Any			     =					0

						# right
						for i in range(20						):
									for j in range(17						):
												UpperCAmelCase_     : Union[str, Any]			     =					l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
												if temp > maximum:
															UpperCAmelCase_     : Any			     =					temp

        # down
						for i in range(17						):
									for j in range(20						):
												UpperCAmelCase_     : List[Any]			     =					l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
												if temp > maximum:
															UpperCAmelCase_     : Tuple			     =					temp

        # diagonal 1
						for i in range(17						):
									for j in range(17						):
												UpperCAmelCase_     : str			     =					l[i][j] * l[i + 1][j + 1] * l[i + 2][j + 2] * l[i + 3][j + 3]
												if temp > maximum:
															UpperCAmelCase_     : List[str]			     =					temp

        # diagonal 2
						for i in range(17						):
									for j in range(3	,20						):
												UpperCAmelCase_     : List[Any]			     =					l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
												if temp > maximum:
															UpperCAmelCase_     : List[str]			     =					temp
						return maximum


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



