The glorious team at V.R.N.C. have developed a vaccine against the latest illness. The vaccine starts at one individual and spreads itself to his neighbours (assuming the population is accurately represented by an matrix). After that each person will again spread its vaccine to the neighbours and that will keep happening until a person on the border is vaccinated, at which point it suddenly stops spreading. Considering a matrix where means vaccinated and means not vaccinated the spread may look like this:
After iterations the spread stops and only people have been vaccinated. Your task is given the matrix of people and the value in each cell representing the age of each person, calculate the point where V.R.N.C. should initiate the vaccine to maximize the sum of the ages of all vaccinated people.
Input data
The first line will contain two integers and .
The following lines will contain integers each.
Output data
The first line will contain two integers and where the simulation should start.
If there are multiple solutions print the one with the smallest . In case of equality again print the solution with the smallest .
Constraints and clarifications
- ;
Example 1
stdin
3 4
1 2 3 4
5 6 7 8
9 10 11 12
stdout
2 3
Explanation
Starting at cell () with value the spread will also reach values , , and and the sum will be , the maximum possible sum given any starting point.