'''simple docstring'''

import os






def       __lowercase  ():
				with open(os.path.dirname(UpperCamelCase__       ) + '''/grid.txt'''       ) as f:
								SCREAMING_SNAKE_CASE  :						int      					= []  # noqa: E741
								for _ in range(20       ):
												l.append([int(UpperCamelCase__       ) for x in f.readline().split()]       )

								SCREAMING_SNAKE_CASE  :						Union[str, Any]      					= 0

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

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

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

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


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









'''simple docstring'''

from ...utils import is_torch_available, is_transformers_available


if is_transformers_available() and is_torch_available():
	from .pipeline_vq_diffusion import LearnedClassifierFreeSamplingEmbeddings, VQDiffusionPipeline




