


"""simple docstring"""


import warnings
from typing import List, Optional, Union

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding, PaddingStrategy, PreTokenizedInput, TextInput, TruncationStrategy
from ...utils import TensorType


class 			A__	(						__lowercase):


     """simple docstring"""
     snake_case__	:					Optional[int]													=['''image_processor''', '''tokenizer''']
     snake_case__	:					Optional[int]													='''ViltImageProcessor'''
     snake_case__	:					Dict													=('''BertTokenizer''', '''BertTokenizerFast''')

     def __init__(	self:						List[Any]     ,		__a:						Optional[Any]=None     ,		__a:						Optional[Any]=None     ,		**__a:						Any	)->    Any:
           lowerCamelCase					:					Optional[int]        =	None
           if "feature_extractor" in kwargs:
                 warnings.warn(
                     """The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`"""
                     """ instead."""     ,		__a     ,		)
                 lowerCamelCase					:					Dict        =	kwargs.pop("""feature_extractor"""	)

           lowerCamelCase					:					int        =	image_processor if image_processor is not None else feature_extractor
           if image_processor is None:
                 raise ValueError("""You need to specify an `image_processor`."""	)
           if tokenizer is None:
                 raise ValueError("""You need to specify a `tokenizer`."""	)

           super().__init__(__a     ,		__a	)
           lowerCamelCase					:					Dict        =	self.image_processor

     def __call__(	self:						int     ,		__a:						Optional[int]     ,		__a:						Union[TextInput, PreTokenizedInput, List[TextInput], List[PreTokenizedInput]] = None     ,		__a:						bool = True     ,		__a:						Union[bool, str, PaddingStrategy] = False     ,		__a:						Union[bool, str, TruncationStrategy] = None     ,		__a:						Optional[int] = None     ,		__a:						int = 0     ,		__a:						Optional[int] = None     ,		__a:						Optional[bool] = None     ,		__a:						Optional[bool] = None     ,		__a:						bool = False     ,		__a:						bool = False     ,		__a:						bool = False     ,		__a:						bool = False     ,		__a:						bool = True     ,		__a:						Optional[Union[str, TensorType]] = None     ,		**__a:						Dict     ,		)->    BatchEncoding:
           lowerCamelCase					:					List[Any]        =	self.tokenizer(
               text=__a     ,		add_special_tokens=__a     ,		padding=__a     ,		truncation=__a     ,		max_length=__a     ,		stride=__a     ,		pad_to_multiple_of=__a     ,		return_token_type_ids=__a     ,		return_attention_mask=__a     ,		return_overflowing_tokens=__a     ,		return_special_tokens_mask=__a     ,		return_offsets_mapping=__a     ,		return_length=__a     ,		verbose=__a     ,		return_tensors=__a     ,		**__a     ,		)
           # add pixel_values + pixel_mask
           lowerCamelCase					:					Dict        =	self.image_processor(__a     ,		return_tensors=__a	)
           encoding.update(__a	)

           return encoding

     def 		a__						(	self:						str     ,		*__a:						Dict     ,		**__a:						Optional[int]	)->    int:
           return self.tokenizer.batch_decode(*__a     ,		**__a	)

     def 		a__						(	self:						Union[str, Any]     ,		*__a:						Optional[int]     ,		**__a:						int	)->    List[Any]:
           return self.tokenizer.decode(*__a     ,		**__a	)

     @property
     def 		a__						(	self:						Any	)->    Dict:
           lowerCamelCase					:					Optional[Any]        =	self.tokenizer.model_input_names
           lowerCamelCase					:					List[Any]        =	self.image_processor.model_input_names
           return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names	)	)

     @property
     def 		a__						(	self:						List[str]	)->    List[Any]:
           warnings.warn(
               """`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead."""     ,		__a     ,		)
           return self.image_processor_class







     @property
     def 		a__						(	self:						List[str]	)->    Optional[int]:
           warnings.warn(
               """`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead."""     ,		__a     ,		)
           return self.image_processor








"""simple docstring"""


import os




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

            lowerCamelCase					:					Union[str, Any]        =	0

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

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

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

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


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




