A solar farm is an R by C grid of panels; panel value g[i][j] is that panel's net daily gain (negative for a panel that costs more to run than it produces). You may commission any non-empty axis-aligned rectangular block of panels. Report the maximum total net gain achievable by a single such rectangle.
Input format
Line 1: two integers R and C.
Next R lines: each has C space-separated integers (one grid row).
Output format
A single integer: the maximum sum over all non-empty axis-aligned subrectangles.
Constraints
- 1 <= R, C <= 100
- -10000 <= each panel value <= 10000