




'''simple docstring'''


def 						SCREAMING_SNAKE_CASE       (      a_	:							int				,					a_	:							int			):
  return x if y == 0 else greatest_common_divisor(a_				,					x % y			)


def 						SCREAMING_SNAKE_CASE       (      a_	:							int				,					a_	:							int			):
  return (x * y) // greatest_common_divisor(a_				,					a_			)


def 						SCREAMING_SNAKE_CASE       (      a_	:							int = 20			):
  __a			=					1
  for i in range(1				,					n + 1			):
    __a			=					lcm(a_				,					a_			)
  return g


if __name__ == "__main__":
  print(f"""{solution() = }""")









'''simple docstring'''


import os


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

    __a			=					0

    # right
    for i in range(20			):
      for j in range(17			):
        __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(17			):
      for j in range(20			):
        __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(17			):
      for j in range(17			):
        __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(17			):
      for j in range(3				,					20			):
        __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())



