





import os



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

        UpperCamelCase__:	int					=     0

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

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

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

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


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








def 				lowerCAmelCase_ (							A_):
    UpperCamelCase__:	Optional[int]					=     len(A_)
    for i in range(1    ,A_):
        UpperCamelCase__:	List[Any]					=     collection[i]
        UpperCamelCase__:	Tuple					=     0
        UpperCamelCase__:	Union[str, Any]					=     i - 1

        while low <= high:
            UpperCamelCase__:	Any					=     (low + high) // 2
            if val < collection[mid]:
                UpperCamelCase__:	str					=     mid - 1
            else:
                UpperCamelCase__:	str					=     mid + 1
        for j in range(A_    ,A_    ,-1):
            UpperCamelCase__:	Optional[int]					=     collection[j - 1]
        UpperCamelCase__:	Optional[Any]					=     val
    return collection


if __name__ == "__main__":
   A__:    Dict  	=	input('''Enter numbers separated by a comma:\n''').strip()
   A__:    Optional[int]  	=	[int(item) for item in user_input.split(''',''')]
   print(binary_insertion_sort(unsorted))

