

'''simple docstring'''
import os


def        _lowerCAmelCase					(						)      ->			List[str]:
     """simple docstring"""




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

          _SCREAMING_SNAKE_CASE							    =0

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

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

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

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


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



'''simple docstring'''
import unittest

import numpy as np
import torch

from diffusers import VersatileDiffusionImageVariationPipeline
from diffusers.utils.testing_utils import load_image, require_torch_gpu, slow, torch_device


lowerCamelCase :      Optional[int]					 =     False







class 							A__    (       unittest.TestCase  ):
  pass







@slow
@require_torch_gpu
class 							A__    (       unittest.TestCase  ):





  def 						A  (		self      :	Tuple )	->    Dict:





       '''simple docstring'''






       _SCREAMING_SNAKE_CASE							    =VersatileDiffusionImageVariationPipeline.from_pretrained('shi-labs/versatile-diffusion' )
       pipe.to(_a )
       pipe.set_progress_bar_config(disable=_a )

       _SCREAMING_SNAKE_CASE							    =load_image(
           'https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/versatile_diffusion/benz.jpg' )
       _SCREAMING_SNAKE_CASE							    =torch.manual_seed(0 )
       _SCREAMING_SNAKE_CASE							    =pipe(
           image=_a							,					generator=_a							,					guidance_scale=7.5							,					num_inference_steps=50							,					output_type='numpy'							,					).images

       _SCREAMING_SNAKE_CASE							    =image[0, 253:256, 253:256, -1]

       assert image.shape == (1, 512, 512, 3)
       _SCREAMING_SNAKE_CASE							    =np.array([0.04_41, 0.04_69, 0.05_07, 0.05_75, 0.06_32, 0.06_50, 0.08_65, 0.09_09, 0.09_45] )

       assert np.abs(image_slice.flatten() - expected_slice ).max() < 1e-2
