






import os

def   __lowercase       (			):







				"""simple docstring"""






				with open(os.path.dirname(snake_case			) + '''/grid.txt'''			) as f:
								__magic_name__		:int   =   []  # noqa: E741
								for _ in range(2_0			):
												l.append([int(snake_case			) for x in f.readline().split()]			)

								__magic_name__		:Union[str, Any]   =   0

								# right
								for i in range(2_0			):
												for j in range(1_7			):
																__magic_name__		:Any   =   l[i][j] * l[i][j + 1] * l[i][j + 2] * l[i][j + 3]
																if temp > maximum:
																				__magic_name__		:Optional[Any]   =   temp

        # down
								for i in range(1_7			):
												for j in range(2_0			):
																__magic_name__		:Optional[Any]   =   l[i][j] * l[i + 1][j] * l[i + 2][j] * l[i + 3][j]
																if temp > maximum:
																				__magic_name__		:Optional[int]   =   temp

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

        # diagonal 2
								for i in range(1_7			):
												for j in range(3,	2_0			):
																__magic_name__		:int   =   l[i][j] * l[i + 1][j - 1] * l[i + 2][j - 2] * l[i + 3][j - 3]
																if temp > maximum:
																				__magic_name__		:List[str]   =   temp
								return maximum


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














"""simple docstring"""



import unittest

from transformers import is_flax_available
from transformers.testing_utils import require_flax, require_sentencepiece, require_tokenizers, require_torch, slow


if is_flax_available():
 import optax
 from flax.training.common_utils import onehot

 from transformers import AutoTokenizer, FlaxMTaForConditionalGeneration
 from transformers.models.ta.modeling_flax_ta import shift_tokens_right




@require_torch
@require_sentencepiece
@require_tokenizers
@require_flax
class 			lowerCAmelCase__			(    unittest.TestCase   ):
   @slow
   def       __a							(		self      :	List[str]							):


        '''simple docstring'''
        UpperCAmelCase__						:    Union[str, Any]							=							FlaxMTaForConditionalGeneration.from_pretrained("google/mt5-small"							)
        UpperCAmelCase__						:    str							=							AutoTokenizer.from_pretrained("google/mt5-small"							)

        UpperCAmelCase__						:    str							=							tokenizer("Hello there"							,			return_tensors="np"							).input_ids
        UpperCAmelCase__						:    Optional[Any]							=							tokenizer("Hi I am"							,			return_tensors="np"							).input_ids

        UpperCAmelCase__						:    Any							=							shift_tokens_right(snake_case__							,			model.config.pad_token_id							,			model.config.decoder_start_token_id							)

        UpperCAmelCase__						:    Any							=							model(snake_case__							,			decoder_input_ids=snake_case__							).logits
        UpperCAmelCase__						:    Any							=							optax.softmax_cross_entropy(snake_case__							,			onehot(snake_case__							,			logits.shape[-1]							)							).mean()

        UpperCAmelCase__						:    List[str]							=							-(labels.shape[-1] * loss.item())

        UpperCAmelCase__						:    Dict							=							-84.9127
        self.assertTrue(abs(mtf_score - EXPECTED_SCORE							) < 1e-4							)


