



import os


def A						(       )						->      Any:
			with open(os.path.dirname(__UpperCamelCase					) + '/grid.txt'					) as f:
						A__       =    []  # noqa: E741
						for _ in range(20					):
									l.append([int(__UpperCamelCase					) 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())











import webbrowser
from sys import argv
from urllib.parse import parse_qs, quote

import requests
from bsa import BeautifulSoup
from fake_useragent import UserAgent

if __name__ == "__main__":
							SCREAMING_SNAKE_CASE__       =      '''%20'''.join(argv[1:]) if len(argv) > 1 else quote(str(input('''Search: ''')))

							print('''Googling.....''')

							SCREAMING_SNAKE_CASE__       =      f'https://www.google.com/search?q={query}&num=100'

							SCREAMING_SNAKE_CASE__       =      requests.get(
							    url,
							    headers={'''User-Agent''': str(UserAgent().random)},
							)

							try:
														SCREAMING_SNAKE_CASE__       =      (
														    BeautifulSoup(res.text, '''html.parser''')
														    .find('''div''', attrs={'''class''': '''yuRUbf'''})
														    .find('''a''')
														    .get('''href''')
														)

							except AttributeError:
														SCREAMING_SNAKE_CASE__       =      parse_qs(
														    BeautifulSoup(res.text, '''html.parser''')
														    .find('''div''', attrs={'''class''': '''kCrYT'''})
														    .find('''a''')
														    .get('''href''')
														)['''url'''][0]

							webbrowser.open(link)




