






'''simple docstring'''







_A	:			List[str]         ='''ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'''





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase      )      ->       bytes:
							# Make sure the supplied data is a bytes-like object
							if not isinstance(UpperCamelCase				,			UpperCamelCase      ):
														lowerCamelCase__					:	Dict         =       f'''a bytes-like object is required, not \'{data.__class__.__name__}\''''
														raise TypeError(UpperCamelCase      )

							lowerCamelCase__					:	int         =       """""".join(bin(UpperCamelCase      )[2:].zfill(8      ) for byte in data      )

							lowerCamelCase__					:	int         =       len(UpperCamelCase      ) % 6 != 0

							if padding_needed:
														# The padding that will be added later
														lowerCamelCase__					:	Optional[Any]         =       b"""=""" * ((6 - len(UpperCamelCase      ) % 6) // 2)

														# Append binary_stream with arbitrary binary digits (0's by default) to make its
														# length a multiple of 6.
														binary_stream += "0" * (6 - len(UpperCamelCase      ) % 6)
							else:
														lowerCamelCase__					:	Optional[int]         =       b""""""

							# Encode every 6 binary digits to their corresponding Base64 character
							return (
							    "".join(
							        B64_CHARSET[int(binary_stream[index : index + 6]				,			2      )]
							        for index in range(0				,			len(UpperCamelCase      )				,			6      )      ).encode()
							    + padding
							)





def  SCREAMING_SNAKE_CASE_       (UpperCamelCase      )      ->       bytes:
							# Make sure encoded_data is either a string or a bytes-like object
							if not isinstance(UpperCamelCase				,			UpperCamelCase      ) and not isinstance(UpperCamelCase				,			UpperCamelCase      ):
														lowerCamelCase__					:	int         =       (
														    """argument should be a bytes-like object or ASCII string, """
														    f'''not \'{encoded_data.__class__.__name__}\''''
														)
														raise TypeError(UpperCamelCase      )

							# In case encoded_data is a bytes-like object, make sure it contains only
							# ASCII characters so we convert it to a string object
							if isinstance(UpperCamelCase				,			UpperCamelCase      ):
														try:
																					lowerCamelCase__					:	str         =       encoded_data.decode("""utf-8"""      )
														except UnicodeDecodeError:
																					raise ValueError("""base64 encoded data should only contain ASCII characters"""      )

							lowerCamelCase__					:	Tuple         =       encoded_data.count("""="""      )

							# Check if the encoded string contains non base64 characters
							if padding:
														assert all(
														    char in B64_CHARSET for char in encoded_data[:-padding]      ), "Invalid base64 character(s) found."
							else:
														assert all(
														    char in B64_CHARSET for char in encoded_data      ), "Invalid base64 character(s) found."

							# Check the padding
							assert len(UpperCamelCase      ) % 4 == 0 and padding < 3, "Incorrect padding"

							if padding:
														# Remove padding if there is one
														lowerCamelCase__					:	Any         =       encoded_data[:-padding]

														lowerCamelCase__					:	int         =       """""".join(
														    bin(B64_CHARSET.index(UpperCamelCase      )      )[2:].zfill(6      ) for char in encoded_data      )[: -padding * 2]
							else:
														lowerCamelCase__					:	Tuple         =       """""".join(
														    bin(B64_CHARSET.index(UpperCamelCase      )      )[2:].zfill(6      ) for char in encoded_data      )

							lowerCamelCase__					:	List[Any]         =       [
							    int(binary_stream[index : index + 8]				,			2      )
							    for index in range(0				,			len(UpperCamelCase      )				,			8      )
							]

							return bytes(UpperCamelCase      )


if __name__ == "__main__":
			import doctest

			doctest.testmod()









"""simple docstring"""





import os







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

    lowerCamelCase_         =						0

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

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

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

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


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




