





'''simple docstring'''






import os



def        UpperCamelCase__		(						)				->			Union[str, Any]:
 '''simple docstring'''






 with open(os.path.dirname(__magic_name__      ) + """/grid.txt"""      ) as f:
  snake_case__     :					List[str]    =  []  # noqa: E741
  for _ in range(20      ):
   l.append([int(__magic_name__      ) for x in f.readline().split()]      )

  snake_case__     :					Optional[int]    =  0

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

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

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

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


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






"""simple docstring"""


from typing import TYPE_CHECKING

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


A_    							=					{
    """configuration_gpt_neo""": ["""GPT_NEO_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTNeoConfig""", """GPTNeoOnnxConfig"""],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A_    							=					[
						    """GPT_NEO_PRETRAINED_MODEL_ARCHIVE_LIST""",
						    """GPTNeoForCausalLM""",
						    """GPTNeoForQuestionAnswering""",
						    """GPTNeoForSequenceClassification""",
						    """GPTNeoForTokenClassification""",
						    """GPTNeoModel""",
						    """GPTNeoPreTrainedModel""",
						    """load_tf_weights_in_gpt_neo""",
						]

try:
						if not is_flax_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						A_    							=					[
						    """FlaxGPTNeoForCausalLM""",
						    """FlaxGPTNeoModel""",
						    """FlaxGPTNeoPreTrainedModel""",
						]


if TYPE_CHECKING:
						from .configuration_gpt_neo import GPT_NEO_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoConfig, GPTNeoOnnxConfig

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_gpt_neo import (
												    GPT_NEO_PRETRAINED_MODEL_ARCHIVE_LIST,
												    GPTNeoForCausalLM,
												    GPTNeoForQuestionAnswering,
												    GPTNeoForSequenceClassification,
												    GPTNeoForTokenClassification,
												    GPTNeoModel,
												    GPTNeoPreTrainedModel,
												    load_tf_weights_in_gpt_neo,
												)

						try:
												if not is_flax_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_flax_gpt_neo import FlaxGPTNeoForCausalLM, FlaxGPTNeoModel, FlaxGPTNeoPreTrainedModel


else:
						import sys

						A_    							=					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)



