"""simple docstring"""


import os







def 					__a   (		A      ):
     lowercase__				 =							len(grid[0]      )
     lowercase__				 =							len(_lowerCamelCase      )

     lowercase__				 =							0
     lowercase__				 =							0
     lowercase__				 =							0

     # Check vertically, horizontally, diagonally at the same time (only works
     # for nxn grid)
     for i in range(_lowerCamelCase      ):
          for j in range(n_rows - 3      ):
               lowercase__				 =							grid[j][i] * grid[j + 1][i] * grid[j + 2][i] * grid[j + 3][i]
               lowercase__				 =							grid[i][j] * grid[i][j + 1] * grid[i][j + 2] * grid[i][j + 3]

               # Left-to-right diagonal (\) product
               if i < n_columns - 3:
                    lowercase__				 =							(
                        grid[i][j]
                        * grid[i + 1][j + 1]
                        * grid[i + 2][j + 2]
                        * grid[i + 3][j + 3]
                    )

               # Right-to-left diagonal(/) product
               if i > 2:
                    lowercase__				 =							(
                        grid[i][j]
                        * grid[i - 1][j + 1]
                        * grid[i - 2][j + 2]
                        * grid[i - 3][j + 3]
                    )

               lowercase__				 =							max(
                   _lowerCamelCase    ,				_lowerCamelCase    ,				_lowerCamelCase    ,				_lowerCamelCase      )
               if max_product > largest:
                    lowercase__				 =							max_product

     return largest







def 					__a   (		):
     lowercase__				 =							[]
     with open(os.path.dirname(_lowerCamelCase      ) + "/grid.txt"      ) as file:
          for line in file:
               grid.append(line.strip("\n"      ).split(" "      )      )

     lowercase__				 =							[[int(_lowerCamelCase      ) for i in grid[j]] for j in range(len(_lowerCamelCase      )      )]

     return largest_product(_lowerCamelCase      )


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





"""simple docstring"""


from __future__ import annotations







def 					__a   (		A    ,				A      ):






     '''simple docstring'''



     if partitions <= 0:
          raise ValueError("partitions must be a positive number!"      )
     if partitions > number_of_bytes:
          raise ValueError("partitions can not > number_of_bytes!"      )
     lowercase__				 =							number_of_bytes // partitions
     lowercase__				 =							[]
     for i in range(A      ):
          lowercase__				 =							i * bytes_per_partition + 1
          lowercase__				 =							(
              number_of_bytes if i == partitions - 1 else (i + 1) * bytes_per_partition
          )
          allocation_list.append(f'''{start_bytes}-{end_bytes}'''      )
     return allocation_list


if __name__ == "__main__":
 import doctest

 doctest.testmod()




