


import os






def 		_A		(		)					-> List[Any]:


     """simple docstring"""


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

          __UpperCamelCase =			0

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

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

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

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


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



"""simple docstring"""




def 				_UpperCAmelCase		(							lowerCamelCase__      ,	lowerCamelCase__  ):





		"""simple docstring"""




		return abs(lowerCamelCase__  ) if a == 0 else greatest_common_divisor(b % a      ,	lowerCamelCase__  )







def 				_UpperCAmelCase		(							lowerCamelCase__      ,	lowerCamelCase__  ):





		"""simple docstring"""




		while y:  # --> when y=0 then loop will terminate and return x as final GCD.
				lowerCAmelCase__ ,       lowerCAmelCase__   = y, x % y
		return abs(lowerCamelCase__  )







def 				_UpperCAmelCase		(							):





		"""simple docstring"""




		try:
				lowerCAmelCase__   = input("""Enter two integers separated by comma (,): """  ).split(""","""  )
				lowerCAmelCase__   = int(nums[0]  )
				lowerCAmelCase__   = int(nums[1]  )
				print(
				    f"""greatest_common_divisor({num_a}, {num_a}) = """
				    f"""{greatest_common_divisor(lowerCamelCase__      ,	lowerCamelCase__  )}"""  )
				print(f"""By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(lowerCamelCase__      ,	lowerCamelCase__  )}"""  )
		except (IndexError, UnboundLocalError, ValueError):
				print("""Wrong input"""  )


if __name__ == "__main__":
			main()




