"""simple docstring"""
import os





def 				lowerCAmelCase__      (     )   ->			Optional[Any]:





						"""simple docstring"""






						with open(os.path.dirname(_UpperCamelCase   ) + '/grid.txt'   ) as f:
												snake_case        =     []  # noqa: E741
												for _ in range(2_0   ):
																		l.append([int(_UpperCamelCase   ) for x in f.readline().split()]   )

												snake_case        =     0

												# right
												for i in range(2_0   ):
																		for j in range(1_7   ):
																								snake_case        =     l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
																								if temp > maximum:
																														snake_case        =     temp

        # down
												for i in range(1_7   ):
																		for j in range(2_0   ):
																								snake_case        =     l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
																								if temp > maximum:
																														snake_case        =     temp

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

        # diagonal 2
												for i in range(1_7   ):
																		for j in range(3	,     2_0   ):
																								snake_case        =     l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
																								if temp > maximum:
																														snake_case        =     temp
												return maximum


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



"""simple docstring"""
import pickle
import unittest

import torch

from accelerate import Accelerator
from accelerate.state import AcceleratorState
from accelerate.test_utils import require_cpu



@require_cpu
class 					lowerCAmelCase_      (     unittest.TestCase   ):



				"""simple docstring"""

				def 						snake_case	(			self      ):






										"""simple docstring"""

										snake_case        =     torch.nn.Linear(10						,      10      )
										snake_case        =     torch.optim.SGD(model.parameters()						,      0.1      )
										snake_case        =     Accelerator()
										snake_case        =     accelerator.prepare(lowerCAmelCase      )
										try:
																pickle.loads(pickle.dumps(lowerCAmelCase      )      )
										except Exception as e:
																self.fail(F"""Accelerated optimizer pickling failed with {e}"""      )
										AcceleratorState._reset_state()


