Problem: You've got a table of size n × m. On the intersection of the i-th row (1 ≤ i ≤ n) and the j-th column (1 ≤ j ≤ m) there is a non-negative integer ai, j. Besides, you've got a non-negative integer k.

Your task is to find such pair of integers (a, b) that meets these conditions: 

  * k ≤ a ≤ n - k + 1; 
  * k ≤ b ≤ m - k + 1; 
  * let's denote the maximum of the function <image> among all integers x and y, that satisfy the inequalities k ≤ x ≤ n - k + 1 and k ≤ y ≤ m - k + 1, as mval; for the required pair of numbers the following equation must hold f(a, b) = mval. 

Input

The first line contains three space-separated integers n, m and k (1 ≤ n, m ≤ 1000, <image>). Next n lines each contains m integers: the j-th number on the i-th line equals ai, j (0 ≤ ai, j ≤ 106).

The numbers in the lines are separated by spaces.

Output

Print the required pair of integers a and b. Separate the numbers by a space.

If there are multiple correct answers, you are allowed to print any of them.

Examples

Input

4 4 2
1 2 3 4
1 1 1 1
2 2 2 2
4 3 2 1


Output

3 2


Input

5 7 3
8 2 3 4 2 3 3
3 4 6 2 3 4 6
8 7 6 8 4 5 7
1 2 3 2 1 3 2
4 5 3 2 1 2 1


Output

3 3

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
int nRow, nCol, m, a[1010][1010];
long long val[1010][1010];
void read() {
  scanf("%d %d %d", &nRow, &nCol, &m);
  for (int i = 1; i <= nRow; ++i)
    for (int j = 1; j <= nCol; ++j) scanf("%d", &a[i][j]);
}
long long getsum(int a, int b, int c, int d, long long (*sum)[1010]) {
  return sum[c][d] - sum[a - 1][d] - sum[c][b - 1] + sum[a - 1][b - 1];
}
void calc() {
  static long long sum1[1010][1010], sum2[1010][1010], sum3[1010 * 2][1010],
      sum4[1010 * 2][1010], sum5[1010 * 2][1010], sum6[1010 * 2][1010];
  memset(sum3, 0, sizeof(sum3));
  memset(sum4, 0, sizeof(sum4));
  memset(sum5, 0, sizeof(sum5));
  memset(sum6, 0, sizeof(sum6));
  for (int i = 1; i <= nRow; ++i)
    for (int j = 1; j <= nCol; ++j) {
      sum1[i][j] = sum1[i - 1][j] + sum1[i][j - 1] - sum1[i - 1][j - 1] +
                   (i + j + m) * a[i][j];
      sum2[i][j] =
          sum2[i - 1][j] + sum2[i][j - 1] - sum2[i - 1][j - 1] + a[i][j];
      sum3[i + j][i] = sum5[i + j][j] = (i + j + m) * a[i][j];
      sum4[i + j][i] = sum6[i + j][j] = a[i][j];
    }
  for (int i = 2; i <= nRow + nCol; ++i)
    for (int j = 1; j <= nRow; ++j) {
      sum3[i][j] =
          sum3[i][j] + sum3[i - 1][j] + sum3[i][j - 1] - sum3[i - 1][j - 1];
      sum4[i][j] =
          sum4[i][j] + sum4[i - 1][j] + sum4[i][j - 1] - sum4[i - 1][j - 1];
    }
  for (int i = 2; i <= nRow + nCol; ++i)
    for (int j = 1; j <= nCol; ++j) {
      sum5[i][j] =
          sum5[i][j] + sum5[i - 1][j] + sum5[i][j - 1] - sum5[i - 1][j - 1];
      sum6[i][j] =
          sum6[i][j] + sum6[i - 1][j] + sum6[i][j - 1] - sum6[i - 1][j - 1];
    }
  for (int i = m; i <= nRow - m + 1; ++i)
    for (int j = m; j <= nCol - m + 1; ++j) {
      long long v1 =
          (sum3[nRow + nCol][nRow] - sum3[i + j - m - 1][nRow]) -
          (i + j) * (sum4[nRow + nCol][nRow] - sum4[i + j - m - 1][nRow]);
      long long v2 = getsum(i + j - m, i, nRow + nCol, nRow, sum3) -
                     (i + j) * getsum(i + j - m, i, nRow + nCol, nRow, sum4);
      long long v3 = getsum(i + j - m, j, nRow + nCol, nCol, sum5) -
                     (i + j) * getsum(i + j - m, j, nRow + nCol, nCol, sum6);
      long long v4 = getsum(i, j, nRow, nCol, sum1) -
                     (i + j) * getsum(i, j, nRow, nCol, sum2);
      val[i][j] = v1 - v2 - v3 + v4;
    }
}
void work() {
  static long long ans[1010][1010], sum1[1010], sum2[1010];
  for (int i = 1; i <= nRow; ++i)
    for (int j = 1; j <= nCol; ++j) ans[i][j] = a[i][j] * m;
  for (int i = m; i <= nRow - m + 1; ++i) {
    for (int j = 1; j <= nCol; ++j)
      sum1[j] = sum1[j - 1] + a[i][j] * (j + m),
      sum2[j] = sum2[j - 1] + a[i][j];
    for (int j = m; j <= nCol - m + 1; ++j)
      ans[i][j] +=
          (sum1[j - 1] - sum1[j - m]) - j * (sum2[j - 1] - sum2[j - m]);
    for (int j = nCol; j >= 1; --j)
      sum1[j] = sum1[j + 1] + a[i][j] * (m - j),
      sum2[j] = sum2[j + 1] + a[i][j];
    for (int j = m; j <= nCol - m + 1; ++j)
      ans[i][j] +=
          (sum1[j + 1] - sum1[j + m]) + j * (sum2[j + 1] - sum2[j + m]);
  }
  sum1[nRow + 1] = sum2[nRow + 1] = 0;
  for (int j = m; j <= nCol - m + 1; ++j) {
    for (int i = 1; i <= nRow; ++i)
      sum1[i] = sum1[i - 1] + a[i][j] * (i + m),
      sum2[i] = sum2[i - 1] + a[i][j];
    for (int i = m; i <= nRow - m + 1; ++i)
      ans[i][j] +=
          (sum1[i - 1] - sum1[i - m]) - i * (sum2[i - 1] - sum2[i - m]);
    for (int i = nRow; i >= 1; --i)
      sum1[i] = sum1[i + 1] + a[i][j] * (m - i),
      sum2[i] = sum2[i + 1] + a[i][j];
    for (int i = m; i <= nRow - m + 1; ++i)
      ans[i][j] +=
          (sum1[i + 1] - sum1[i + m]) + i * (sum2[i + 1] - sum2[i + m]);
  }
  calc();
  for (int i = m; i <= nRow - m + 1; ++i)
    for (int j = m; j <= nCol - m + 1; ++j) ans[i][j] += val[i][j];
  for (int i = 1; i * 2 <= nRow; ++i)
    for (int j = 1; j <= nCol; ++j) swap(a[i][j], a[nRow - i + 1][j]);
  calc();
  for (int i = m; i <= nRow - m + 1; ++i)
    for (int j = m; j <= nCol - m + 1; ++j) ans[nRow - i + 1][j] += val[i][j];
  for (int i = 1; i <= nRow; ++i)
    for (int j = 1; j * 2 <= nCol; ++j) swap(a[i][j], a[i][nCol - j + 1]);
  calc();
  for (int i = m; i <= nRow - m + 1; ++i)
    for (int j = m; j <= nCol - m + 1; ++j)
      ans[nRow - i + 1][nCol - j + 1] += val[i][j];
  for (int i = 1; i * 2 <= nRow; ++i)
    for (int j = 1; j <= nCol; ++j) swap(a[i][j], a[nRow - i + 1][j]);
  calc();
  for (int i = m; i <= nRow - m + 1; ++i)
    for (int j = m; j <= nCol - m + 1; ++j) ans[i][nCol - j + 1] += val[i][j];
  int x, y;
  long long maxv = -1000000000000000000LL;
  for (int i = m; i <= nRow - m + 1; ++i)
    for (int j = m; j <= nCol - m + 1; ++j)
      if (maxv < ans[i][j]) maxv = ans[i][j], x = i, y = j;
  printf("%d %d\n", x, y);
}
int main() {
  read();
  work();
  return 0;
}