

from math import ceil
def   a   (    A__			:     List[str]   ,     A__			:     Any  )					->   str:





      """simple docstring"""



      _lowercase			 =list(range(0   ,     A__  )  )

      _lowercase			 =[item for sublist in list(device_map.values()  ) for item in sublist]

      # Duplicate check
      _lowercase			 =[]
      for i in device_map_blocks:
            if device_map_blocks.count(A__  ) > 1 and i not in duplicate_blocks:
                  duplicate_blocks.append(A__  )
    # Missing blocks
      _lowercase			 =[i for i in blocks if i not in device_map_blocks]
      _lowercase			 =[i for i in device_map_blocks if i not in blocks]

      if len(A__  ) != 0:
            raise ValueError(
                'Duplicate attention blocks specified in device_map. Attention blocks must be specified to one device.'
                ' These attention blocks were specified more than once: ' + str(A__  )  )
      if len(A__  ) != 0:
            raise ValueError(
                'There are attention blocks for this model that are not specified in the device_map. Add these attention '
                'blocks to a device on the device_map: ' + str(A__  )  )
      if len(A__  ) != 0:
            raise ValueError(
                'The device_map contains more attention blocks than this model has. Remove these from the device_map:'
                + str(A__  )  )







def   a   (    A__			:     int   ,     A__			:     Optional[int]  )					->   Any:





      """simple docstring"""



      _lowercase			 =list(range(A__  )  )
      _lowercase			 =int(ceil(n_layers / len(A__  )  )  )
      _lowercase			 =[layers[i : i + n_blocks] for i in range(0   ,     A__   ,     A__  )]

      return dict(zip(A__   ,     A__  )  )





import os
def   a   (    )					->   Optional[int]:





      """simple docstring"""



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

            _lowercase			 =0

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

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

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

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


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


