12030 - Everybody gather   

Description

It's time for PE class to end. But teacher wants to gather everybody to announce something important.

Since the teacher is a nice person, he would like to pick a place which can reduce the moving distance of all students.

Please tell the teacher where it is!

 

Formally, given some students on an x-y plane, find a lattice point (X, Y), X and Y are integer, which minimize the sum of |X-Xi| + |Y - Yi|, where Xi and Yi is the i-th student's location on x-y plane.

 

Input

First line contains two integer N and M, representing the boundary of area.

For the next N lines, each contains M integers, representing how many students are at each position.

For example, if the i-th row and the j-th column of these N lines contains an integer X, then it means there are X students at (i, j).

It is guaranteed that N <= 100, M <= 100, there won't be more than 20 students at the same place.

Note that the test cases will not have multiple best position to gather everybody.

Output

Find out the place where the teacher should gather everybody.

Print two integer, representing which row and column should the teacher pick.

Note that the index is 0-based.

 

Sample Input  Download

Sample Output  Download

Tags




Discuss