





'''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_torch_available, is_vision_available


__snake_case       =       {
    """configuration_poolformer""": [
        """POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """PoolFormerConfig""",
        """PoolFormerOnnxConfig""",
    ]
}

try:
  if not is_vision_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __snake_case       =       ["""PoolFormerFeatureExtractor"""]
  __snake_case       =       ["""PoolFormerImageProcessor"""]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  __snake_case       =       [
      """POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """PoolFormerForImageClassification""",
      """PoolFormerModel""",
      """PoolFormerPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_poolformer import (
      POOLFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
      PoolFormerConfig,
      PoolFormerOnnxConfig,
  )

  try:
    if not is_vision_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .feature_extraction_poolformer import PoolFormerFeatureExtractor
    from .image_processing_poolformer import PoolFormerImageProcessor

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_poolformer import (
        POOLFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
        PoolFormerForImageClassification,
        PoolFormerModel,
        PoolFormerPreTrainedModel,
    )


else:
  import sys

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





