"""simple docstring"""



from __future__ import annotations

# This is the precision for this function which can be altered.
# It is recommended for users to keep this number greater than or equal to 10.
SCREAMING_SNAKE_CASE__:List[Any]			=	10



def 					_lowerCamelCase(					a ,  a ,  a ,  a							):
       for i in range(a ,  a							):
              if array[i] == target:
                     return i
       return -1



def 					_lowerCamelCase(					a ,  a							):
       __a     				=  0
       __a     				=  len(a							)
       while left <= right:
              if right - left < precision:
                     return lin_search(a ,  a ,  a ,  a							)

              __a     				=  (left + right) // 3 + 1
              __a     				=  2 * (left + right) // 3 + 1

              if array[one_third] == target:
                     return one_third
              elif array[two_third] == target:
                     return two_third

              elif target < array[one_third]:
                     __a     				=  one_third - 1
              elif array[two_third] < target:
                     __a     				=  two_third + 1

              else:
                     __a     				=  one_third + 1
                     __a     				=  two_third - 1
       else:
              return -1



def 					_lowerCamelCase(					a ,  a ,  a ,  a							):
       if left < right:
              if right - left < precision:
                     return lin_search(a ,  a ,  a ,  a							)
              __a     				=  (left + right) // 3 + 1
              __a     				=  2 * (left + right) // 3 + 1

              if array[one_third] == target:
                     return one_third
              elif array[two_third] == target:
                     return two_third

              elif target < array[one_third]:
                     return rec_ternary_search(a ,  one_third - 1 ,  a ,  a							)
              elif array[two_third] < target:
                     return rec_ternary_search(two_third + 1 ,  a ,  a ,  a							)
              else:
                     return rec_ternary_search(one_third + 1 ,  two_third - 1 ,  a ,  a							)
       else:
              return -1


if __name__ == "__main__":
   import doctest

   doctest.testmod()

   SCREAMING_SNAKE_CASE__:Tuple			=	input("""Enter numbers separated by comma:\n""").strip()
   SCREAMING_SNAKE_CASE__:Union[str, Any]			=	[int(item.strip()) for item in user_input.split(""",""")]
   assert collection == sorted(collection), F"List must be ordered.\n{collection}."
   SCREAMING_SNAKE_CASE__:Tuple			=	int(input("""Enter the number to be found in the list:\n""").strip())
   SCREAMING_SNAKE_CASE__:Any			=	ite_ternary_search(collection, target)
   SCREAMING_SNAKE_CASE__:Tuple			=	rec_ternary_search(0, len(collection) - 1, collection, target)
   if resulta != -1:
      print(F'''Iterative search: {target} found at positions: {resulta}''')
      print(F'''Recursive search: {target} found at positions: {resulta}''')
   else:
      print("""Not found""")

"""simple docstring"""



import os



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

              __a     				=  0

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

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

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

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


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