

'''simple docstring'''
import os




def 	UpperCamelCase   (       )		->	str:




  '''simple docstring'''



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

    lowercase									=0

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

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

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

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


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




'''simple docstring'''





def        a__     (					UpperCamelCase_						:      int | float | str						):
   try:
      UpperCAmelCase__	:Union[str, Any]      =      float(UpperCamelCase_						)
   except ValueError:
      raise ValueError('''Please enter a valid number'''						)
   UpperCAmelCase__	:List[str]      =      decimal - int(UpperCamelCase_						)
   if fractional_part == 0:
      return int(UpperCamelCase_						), 1
   else:
      UpperCAmelCase__	:List[Any]      =      len(str(UpperCamelCase_						).split('''.'''						)[1]						)
      UpperCAmelCase__	:Tuple      =      int(decimal * (10**number_of_frac_digits)						)
      UpperCAmelCase__	:int      =      10**number_of_frac_digits
      UpperCAmelCase__   ,						UpperCAmelCase__	:List[str]      =      denominator, numerator
      while True:
         UpperCAmelCase__	:Optional[Any]      =      dividend % divisor
         if remainder == 0:
            break
         UpperCAmelCase__   ,						UpperCAmelCase__	:List[str]      =      divisor, remainder
      UpperCAmelCase__   ,						UpperCAmelCase__	:Tuple      =      numerator / divisor, denominator / divisor
      return int(UpperCamelCase_						), int(UpperCamelCase_						)


if __name__ == "__main__":
    print(F'''{decimal_to_fraction(2) = }''')
    print(F'''{decimal_to_fraction(89.0) = }''')
    print(F'''{decimal_to_fraction("67") = }''')
    print(F'''{decimal_to_fraction("45.0") = }''')
    print(F'''{decimal_to_fraction(1.5) = }''')
    print(F'''{decimal_to_fraction("6.25") = }''')
    print(F'''{decimal_to_fraction("78td") = }''')



