




from collections import OrderedDict
from typing import Mapping

from packaging import version

from ...configuration_utils import PretrainedConfig
from ...onnx import OnnxConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


UpperCAmelCase_		:					Optional[Any]          =  logging.get_logger(__name__)

UpperCAmelCase_		:					Union[str, Any]          =  {
    "microsoft/swin-tiny-patch4-window7-224": (
        "https://huggingface.co/microsoft/swin-tiny-patch4-window7-224/resolve/main/config.json"
    ),
    # See all Swin models at https://huggingface.co/models?filter=swin
}




class 		__A   (      UpperCamelCase__       ,    UpperCamelCase__      ):
						UpperCamelCase      =       """swin"""

						UpperCamelCase      =       {
						    """num_attention_heads""": """num_heads""",
						    """num_hidden_layers""": """num_layers""",
						}

						def __init__(		self :List[Any]     ,			__snake_case :Optional[int]=2_24     ,			__snake_case :str=4     ,			__snake_case :Tuple=3     ,			__snake_case :Any=96     ,			__snake_case :Any=[2, 2, 6, 2]     ,			__snake_case :Union[str, Any]=[3, 6, 12, 24]     ,			__snake_case :Optional[int]=7     ,			__snake_case :str=4.0     ,			__snake_case :Optional[Any]=True     ,			__snake_case :Any=0.0     ,			__snake_case :int=0.0     ,			__snake_case :int=0.1     ,			__snake_case :Optional[int]="gelu"     ,			__snake_case :Any=False     ,			__snake_case :Union[str, Any]=0.02     ,			__snake_case :Dict=1E-5     ,			__snake_case :Dict=32     ,			__snake_case :Any=None     ,			__snake_case :List[str]=None     ,			**__snake_case :Union[str, Any]     ,			):
										'''simple docstring'''

										super().__init__(**__snake_case			)

										__magic_name__						:						List[Any]										=image_size
										__magic_name__						:						Dict										=patch_size
										__magic_name__						:						Tuple										=num_channels
										__magic_name__						:						Union[str, Any]										=embed_dim
										__magic_name__						:						Union[str, Any]										=depths
										__magic_name__						:						Optional[int]										=len(__snake_case			)
										__magic_name__						:						Any										=num_heads
										__magic_name__						:						List[str]										=window_size
										__magic_name__						:						List[Any]										=mlp_ratio
										__magic_name__						:						Optional[int]										=qkv_bias
										__magic_name__						:						Dict										=hidden_dropout_prob
										__magic_name__						:						str										=attention_probs_dropout_prob
										__magic_name__						:						List[Any]										=drop_path_rate
										__magic_name__						:						Tuple										=hidden_act
										__magic_name__						:						Tuple										=use_absolute_embeddings
										__magic_name__						:						int										=layer_norm_eps
										__magic_name__						:						Optional[int]										=initializer_range
										__magic_name__						:						List[Any]										=encoder_stride
										# we set the hidden_size attribute in order to make Swin work with VisionEncoderDecoderModel
										# this indicates the channel dimension after the last stage of the model
										__magic_name__						:						Union[str, Any]										=int(embed_dim * 2 ** (len(__snake_case			) - 1)			)
										__magic_name__						:						Tuple										=["""stem"""] + [f"stage{idx}" for idx in range(1     ,			len(__snake_case			) + 1			)]
										__magic_name__					,			__magic_name__						:						Tuple										=get_aligned_output_features_output_indices(
										    out_features=__snake_case     ,			out_indices=__snake_case     ,			stage_names=self.stage_names			)




class 		__A   (      UpperCamelCase__      ):
						UpperCamelCase      =       version.parse("""1.11"""      )

						@property
						def      A__    (		self :Optional[Any]			):
										'''simple docstring'''

										return OrderedDict(
										    [
										        ("""pixel_values""", {0: """batch""", 1: """num_channels""", 2: """height""", 3: """width"""}),
										    ]			)


						@property
						def      A__    (		self :List[Any]			):
										'''simple docstring'''

										return 1E-4











import os



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

  UpperCamelCase      :   str			      =  0

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

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

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

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


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