






"""simple docstring"""





import os
import sys
import unittest


_SCREAMING_SNAKE_CASE					:				Tuple					    =						os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
sys.path.append(os.path.join(git_repo_path, '''utils'''))

import get_test_info  # noqa: E402
from get_test_info import (  # noqa: E402
    get_model_to_test_mapping,
    get_model_to_tester_mapping,
    get_test_to_tester_mapping,
)


_SCREAMING_SNAKE_CASE					:				Optional[Any]					    =						os.path.join('''tests''', '''models''', '''bert''', '''test_modeling_bert.py''')
_SCREAMING_SNAKE_CASE					:				Union[str, Any]					    =						os.path.join('''tests''', '''models''', '''blip''', '''test_modeling_blip.py''')






class      a						(					unittest.TestCase		):






    def    UpperCamelCase       (       self     :							str					)     ->		Any:
      lowerCamelCase_         =						get_test_to_tester_mapping(__SCREAMING_SNAKE_CASE					)
      lowerCamelCase_         =						get_test_to_tester_mapping(__SCREAMING_SNAKE_CASE					)

      lowerCamelCase_         =						{'BertModelTest': 'BertModelTester'}

      lowerCamelCase_         =						{
          'BlipModelTest': 'BlipModelTester',
          'BlipTextImageModelTest': 'BlipTextImageModelsModelTester',
          'BlipTextModelTest': 'BlipTextModelTester',
          'BlipTextRetrievalModelTest': 'BlipTextRetrievalModelTester',
          'BlipVQAModelTest': 'BlipVQAModelTester',
          'BlipVisionModelTest': 'BlipVisionModelTester',
      }

      self.assertEqual(get_test_info.to_json(__SCREAMING_SNAKE_CASE					)       ,						__SCREAMING_SNAKE_CASE					)
      self.assertEqual(get_test_info.to_json(__SCREAMING_SNAKE_CASE					)       ,						__SCREAMING_SNAKE_CASE					)






    def    UpperCamelCase       (       self     :							int					)     ->		Dict:
      lowerCamelCase_         =						get_model_to_test_mapping(__SCREAMING_SNAKE_CASE					)
      lowerCamelCase_         =						get_model_to_test_mapping(__SCREAMING_SNAKE_CASE					)

      lowerCamelCase_         =						{
          'BertForMaskedLM': ['BertModelTest'],
          'BertForMultipleChoice': ['BertModelTest'],
          'BertForNextSentencePrediction': ['BertModelTest'],
          'BertForPreTraining': ['BertModelTest'],
          'BertForQuestionAnswering': ['BertModelTest'],
          'BertForSequenceClassification': ['BertModelTest'],
          'BertForTokenClassification': ['BertModelTest'],
          'BertLMHeadModel': ['BertModelTest'],
          'BertModel': ['BertModelTest'],
      }

      lowerCamelCase_         =						{
          'BlipForConditionalGeneration': ['BlipTextImageModelTest'],
          'BlipForImageTextRetrieval': ['BlipTextRetrievalModelTest'],
          'BlipForQuestionAnswering': ['BlipVQAModelTest'],
          'BlipModel': ['BlipModelTest'],
          'BlipTextModel': ['BlipTextModelTest'],
          'BlipVisionModel': ['BlipVisionModelTest'],
      }

      self.assertEqual(get_test_info.to_json(__SCREAMING_SNAKE_CASE					)       ,						__SCREAMING_SNAKE_CASE					)
      self.assertEqual(get_test_info.to_json(__SCREAMING_SNAKE_CASE					)       ,						__SCREAMING_SNAKE_CASE					)






    def    UpperCamelCase       (       self     :							Optional[int]					)     ->		Optional[Any]:
      lowerCamelCase_         =						get_model_to_tester_mapping(__SCREAMING_SNAKE_CASE					)
      lowerCamelCase_         =						get_model_to_tester_mapping(__SCREAMING_SNAKE_CASE					)

      lowerCamelCase_         =						{
          'BertForMaskedLM': ['BertModelTester'],
          'BertForMultipleChoice': ['BertModelTester'],
          'BertForNextSentencePrediction': ['BertModelTester'],
          'BertForPreTraining': ['BertModelTester'],
          'BertForQuestionAnswering': ['BertModelTester'],
          'BertForSequenceClassification': ['BertModelTester'],
          'BertForTokenClassification': ['BertModelTester'],
          'BertLMHeadModel': ['BertModelTester'],
          'BertModel': ['BertModelTester'],
      }

      lowerCamelCase_         =						{
          'BlipForConditionalGeneration': ['BlipTextImageModelsModelTester'],
          'BlipForImageTextRetrieval': ['BlipTextRetrievalModelTester'],
          'BlipForQuestionAnswering': ['BlipVQAModelTester'],
          'BlipModel': ['BlipModelTester'],
          'BlipTextModel': ['BlipTextModelTester'],
          'BlipVisionModel': ['BlipVisionModelTester'],
      }

      self.assertEqual(get_test_info.to_json(__SCREAMING_SNAKE_CASE					)       ,						__SCREAMING_SNAKE_CASE					)
      self.assertEqual(get_test_info.to_json(__SCREAMING_SNAKE_CASE					)       ,						__SCREAMING_SNAKE_CASE					)












"""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())




