E. Strawberry Mushroom Cells (Yellow)
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output

You are given an $$$N \times N$$$ grid representing a section of a Mario Kart track. Each cell contains a non-negative integer.

  • A cell with value 0 denotes a racer.
  • A cell with a positive value denotes a strawberry mushroom item block containing that many strawberry mushrooms.

Each racer is positioned at a fixed cell (with value 0) and cannot move to any other location. From this position, they can instantly collect all strawberry mushrooms from their immediately adjacent cells (up, down, left, and right). Each racer collects mushrooms independently, so the same mushroom block can be fully collected by multiple racers if it is adjacent to more than one of them.

Red Mushroom fan club

Find a single racer who can collect the maximum total number of strawberry mushrooms from their adjacent cells. Output their 0-indexed row and column.

If multiple racers can collect the same maximum amount, output the one with the lowest coordinates. Coordinates $$$(r_1, c_1)$$$ are considered lower than $$$(r_2, c_2)$$$ if $$$r_1 \lt r_2$$$, or if $$$r_1 = r_2$$$ and $$$c_1 \lt c_2$$$.

Note: It is guaranteed that the grid has at least one racer in it.

Input

The first line contains a single integer $$$N$$$ ($$$2 \le N \le 1000$$$) — the size of the grid.

Then $$$N$$$ lines follow, each with $$$N$$$ non-negative $$$a_{i,j}$$$ ($$$0 \le a_{i,j} \le 10^6$$$) — the number written in each cell.

Output

Output two space-separated integers: the row and column of a racer who can collect the most mushrooms (0-indexed).

If multiple racers can collect the same maximum amount, output the one with the lowest coordinates. Coordinates $$$(r_1, c_1)$$$ are considered lower than $$$(r_2, c_2)$$$ if $$$r_1 \lt r_2$$$, or if $$$r_1 = r_2$$$ and $$$c_1 \lt c_2$$$.

Examples
Input
3
0 2 0
1 0 3
0 4 0
Output
1 1
Input
3
10 0 10
5 5 5
10 0 12
Output
2 1