Let's consider a *k* × *k* square, divided into unit squares. Please note that *k* ≥ 3 and is odd. We'll paint squares starting from the upper left square in the following order: first we move to the right, then down, then to the left, then up, then to the right again and so on. We finish moving in some direction in one of two cases: either we've reached the square's border or the square following after the next square is already painted. We finish painting at the moment when we cannot move in any direction and paint a square. The figure that consists of the painted squares is a spiral.

You have an *n* × *m* table, each of its cells contains a number. Let's consider all possible spirals, formed by the table cells. It means that we consider all spirals of any size that don't go beyond the borders of the table. Let's find the sum of the numbers of the cells that form the spiral. You have to find the maximum of those values among all spirals.

The first line contains two integers *n* and *m* (3 ≤ *n*, *m* ≤ 500) — the sizes of the table.

Each of the next *n* lines contains *m* space-separated integers: the *j*-th number in the *i*-th line *a*_{ij} ( - 1000 ≤ *a*_{ij} ≤ 1000) is the number recorded in the *j*-th cell of the *i*-th row of the table.

提交代码