Construction of a warehouse#1892

Construction of a warehouse

1 second
64 megabytes
Very easy

On a map of size M \times N, a hero can build a warehouse in one of the map's cells and store various items scattered around the map. In each move, the hero may:

Kolya wants to determine the cell for the warehouse so that, after its construction, the total number of moves needed to collect and store all items is minimized.

Input

The first line contains two integers, and , representing the size of the map (1 \leq M, N \leq 1000). The following lines each contain integers, indicating the number of items in each corresponding cell. All these numbers are non-negative and do not exceed .

Output

Print the coordinates (row and column) of the cell where the warehouse should be built on the first line. On the second line, print the minimum number of moves required to collect and store all the items. Note: if an item is already at the cell of the warehouse, it must still be picked up and deposited into the warehouse.

Examples

Example 1

Loading
Loading