It's Diwali time and you are on a tour of Codepur, a city consisting of buildings of equal length and breadth because they were designed by a computer architect with a bit of OCD.
The ruling party of Codepur wants to have a blockbuster Diwali celebration but lack enough funds and decided to open a donation channel called Codepur Cares Fund (CCF). So they decided to run a survey.
Each building eihter has permanent donors, whose impact value is represented as a positive integer, or potential donors, whose impact value is represented by negative integers.
Overwhelmed by the response, and sticking to their resource optimized philosophy, they decided to hire you to determine the contiguous buildings which are allowed to donate to CCF with the following rule:
The contiguous buildings / areas with the maximum sum impact shall be allowed for donating to Codepur Cares Fund (CCF).
Help them out to get a stunning Diwali bonus and rest of your trip sponsered!

-----Input:-----
The first line consists of two tab spaced integers m and n, indicating number of rows and columns respectively in the Codepur's city plan (which is a 2-D Matrix).
The next $m$ lines consist of $n$ tab spaced integers $ti$ indicating rows in the matrix.

-----Output:-----
Print the bulidings (represented by their donors numbers) which are eligible to donate to CCF (i.e, have the largest sum contiguously) as a 2-D matrix with the elements being tab-spaced.

-----Constraints-----
- $0 \leq m,n \leq 10^{15}$
- $-10^{15} \leq ti \leq 10^5$

-----Sample Input:-----
6    5
0    -2    -7    0    -1
9    2    -6    2    0
-4    1    -4    1    0
-1    8    0    -2    1
-10    1    1    -5    6
-15    -1    1    5    -4

-----Sample Output:-----
9    2
-4    1
-1    8

```python

USER_FILENAME = "<user_code>"
import sys, json, builtins
import math, heapq, bisect, itertools, functools, collections, statistics, fractions, decimal, operator, array, random, re, string, os, pathlib
try:
    import resource as _res
except Exception:
    _res = None
from collections import Counter, defaultdict, deque, OrderedDict
from functools import lru_cache, reduce
from itertools import accumulate, permutations, combinations, product
from math import gcd, ceil, floor, sqrt
from decimal import Decimal
try:
    from typing import *
except Exception:
    pass
try:
    sys.setrecursionlimit(1_000_000)
except Exception:
    pass
try:
    import site as _site
    try:
        _sys_sites = _site.getsitepackages() if hasattr(_site, "getsitepackages") else []
        for _p in _sys_sites:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
    try:
        _usp = _site.getusersitepackages()
        if isinstance(_usp, str):
            _usp = [_usp]
        for _p in _usp:
            if _p and _p not in sys.path:
                sys.path.append(_p)
    except Exception:
        pass
except Exception:
    pass

ns = {"__name__": "__main__"}
for _k, _v in list(globals().items()):
    if not _k.startswith("_"):
        ns[_k] = _v
_CODE = "#dt = {} for i in x: dt[i] = dt.get(i,0)+1\r\nimport sys;input = sys.stdin.readline\r\ninp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]\r\n\r\ndef kadane(arr, start, finish, n):\r\n    Sum = 0\r\n    maxSum = float('-inf')\r\n    i = None\r\n    finish[0] = -1\r\n    local_start = 0\r\n    for i in range(n):\r\n        Sum += arr[i]\r\n        if Sum < 0:\r\n            Sum = 0\r\n            local_start = i + 1\r\n        elif Sum > maxSum:\r\n            maxSum = Sum\r\n            start[0] = local_start\r\n            finish[0] = i\r\n\r\n    if finish[0] != -1:\r\n        return maxSum\r\n\r\n    maxSum = arr[0]\r\n    start[0] = finish[0] = 0\r\n\r\n    for i in range(1, n):\r\n        if arr[i] > maxSum:\r\n            maxSum = arr[i]\r\n            start[0] = finish[0] = i\r\n    return maxSum\r\n\r\ndef findMaxSum(M):\r\n    nonlocal ROW, COL\r\n    maxSum, finalLeft = float('-inf'), None\r\n    finalRight, finalTop, finalBottom = None, None, None\r\n    left, right, i = None, None, None\r\n\r\n    temp = [None] * ROW\r\n    Sum = 0\r\n    start = [0]\r\n    finish = [0]\r\n\r\n    for left in range(COL):\r\n        temp = [0] * ROW\r\n        for right in range(left, COL):\r\n            for i in range(ROW):\r\n                temp[i] += M[i][right]\r\n            Sum = kadane(temp, start, finish, ROW)\r\n            if Sum > maxSum:\r\n                maxSum = Sum\r\n                finalLeft = left\r\n                finalRight = right\r\n                finalTop = start[0]\r\n                finalBottom = finish[0]\r\n\r\n    for i in range(finalTop,finalBottom+1):\r\n        print(*M[i][finalLeft:finalRight+1])\r\n\r\n\r\nROW,COL = ip()\r\nM = [ip() for i in range(ROW)]\r\nfindMaxSum(M)\r\n\r\n\r\n    \r\n"
_co = compile(_CODE, USER_FILENAME, "exec")
exec(_co, ns, ns)

```

Measured memory_bytes: