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;
bool debug = false;
long long n, m, k;
long long a[1005][1005];
long long tri[4][1005][1005];
long long colsum[1005][1005], rowsum[1005][1005];
int dsuid[1005][1005], dsuind[1005][1005];
long long dsusum[2005][2005];
int dsdid[1005][1005], dsdind[1005][1005];
long long dsdsum[2005][2005];
long long f[1005][1005];
int dsuic, dsdic;
const int L = 0, R = 1;
void runDsu(int x, int y) {
  int cnt = 0;
  while (true) {
    dsuid[x][y] = dsuic;
    dsuind[x][y] = cnt;
    dsusum[dsuic][cnt] = (cnt == 0 ? 0 : dsusum[dsuic][cnt - 1]) + a[x][y];
    cnt++;
    x--;
    y++;
    if (x < 0 || y >= m) {
      break;
    }
  }
  dsuic++;
}
void runDsd(int x, int y) {
  int cnt = 0;
  while (true) {
    dsdid[x][y] = dsdic;
    dsdind[x][y] = cnt;
    dsdsum[dsdic][cnt] = (cnt == 0 ? 0 : dsdsum[dsdic][cnt - 1]) + a[x][y];
    cnt++;
    x++;
    y++;
    if (x >= n || y >= m) {
      break;
    }
  }
  dsdic++;
}
inline long long getCS(int col, int st, int ed) {
  if (st > ed) {
    swap(st, ed);
  }
  return colsum[col][ed] - (st == 0 ? 0 : colsum[col][st - 1]);
}
inline long long getDSU(int id, int st, int ed) {
  if (st > ed) {
    swap(st, ed);
  }
  return dsusum[id][ed] - (st == 0 ? 0 : dsusum[id][st - 1]);
}
inline long long getDSD(int id, int st, int ed) {
  if (st > ed) {
    swap(st, ed);
  }
  return dsdsum[id][ed] - (st == 0 ? 0 : dsdsum[id][st - 1]);
}
inline long long getDSU(int x1, int y1, int x2, int y2) {
  if (false)
    cout << "DSU=" << x1 << " " << y1 << " " << x2 << " " << y2 << " "
         << dsuid[x1][y1] << " " << dsuid[x2][y2] << endl;
  assert(dsuid[x1][y1] == dsuid[x2][y2]);
  return getDSU(dsuid[x1][y1], dsuind[x1][y1], dsuind[x2][y2]);
}
inline long long getDSD(int x1, int y1, int x2, int y2) {
  if (false)
    cout << "DSD=" << x1 << " " << y1 << " " << x2 << " " << y2 << " "
         << dsdid[x1][y1] << " " << dsdid[x2][y2] << endl;
  assert(dsdid[x1][y1] == dsdid[x2][y2]);
  return getDSD(dsdid[x1][y1], dsdind[x1][y1], dsdind[x2][y2]);
}
inline long long getRS(int rownum, int l, int r) {
  if (l > r) {
    swap(l, r);
  }
  return rowsum[rownum][r] - (l == 0 ? 0 : rowsum[rownum][l - 1]);
}
void proceedL() {
  for (int i = k - 1; i <= n - k; i++) {
    int up = k - 1;
    for (int j = 0; j < k; j++) {
      tri[L][i][k - 1] += getCS(k - 1 - j, i - up, i + up);
      up--;
    }
  }
  for (int i = k - 1; i <= n - k; i++) {
    if (false) cout << "Doing line " << i << endl;
    for (int j = k; j <= m - k; j++) {
      if (false) cout << "Solving for column " << j << endl;
      long long p1 = tri[L][i][j - 1];
      long long p2 = getCS(j, i - k + 1, i + k - 1);
      long long p3 = getDSU(i, j - k, i - k + 1, j - 1);
      long long p4 = getDSD(i, j - k, i + k - 1, j - 1);
      long long p5 = a[i][j - k];
      if (false)
        cout << i << " " << j << " p=" << p1 << " " << p2 << " " << p3 << " "
             << p4 << " " << p5 << endl;
      tri[L][i][j] = p1 + p2 - p3 - p4 + p5;
    }
  }
  if (false) {
    for (int i = k - 1; i <= n - k; i++) {
      for (int j = k - 1; j <= m - k; j++) {
        cout << tri[L][i][j] << " ";
      }
      cout << endl;
    }
  }
}
void proceedR() {
  for (int i = k - 1; i <= n - k; i++) {
    int up = k - 1;
    for (int j = 0; j < k; j++) {
      tri[R][i][k - 1] += getCS(k - 1 + j, i - up, i + up);
      up--;
    }
  }
  for (int i = k - 1; i <= n - k; i++) {
    if (false) cout << "Doing line " << i << endl;
    for (int j = k; j <= m - k; j++) {
      if (false) cout << "Solving for column " << j << endl;
      long long p1 = tri[R][i][j - 1];
      long long p2 = getCS(j - 1, i - k + 1, i + k - 1);
      long long p3 = getDSD(i, j + k - 1, i - k + 1, j);
      long long p4 = getDSU(i, j + k - 1, i + k - 1, j);
      long long p5 = a[i][j + k - 1];
      if (false)
        cout << i << " " << j << " p=" << p1 << " " << p2 << " " << p3 << " "
             << p4 << " " << p5 << endl;
      tri[R][i][j] = p1 - p2 + p3 + p4 - p5;
    }
  }
  if (false) {
    for (int i = k - 1; i <= n - k; i++) {
      for (int j = k - 1; j <= m - k; j++) {
        cout << tri[R][i][j] << " ";
      }
      cout << endl;
    }
  }
}
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(0);
  cin >> n >> m >> k;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 0; i < m; i++) {
    colsum[i][0] = a[0][i];
    for (int j = 1; j < n; j++) {
      colsum[i][j] = colsum[i][j - 1] + a[j][i];
    }
  }
  for (int i = 0; i < n; i++) {
    rowsum[i][0] = a[i][0];
    for (int j = 1; j < m; j++) {
      rowsum[i][j] = rowsum[i][j - 1] + a[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    runDsu(i, 0);
  }
  for (int i = 1; i < m; i++) {
    runDsu(n - 1, i);
  }
  if (false) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        printf("(%d,%d) in dsu %d ind= %d sum_until=%d\t", i, j, dsuid[i][j],
               dsuind[i][j], dsusum[dsuid[i][j]][dsuind[i][j]]);
      }
      printf("\n");
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    runDsd(i, 0);
  }
  for (int i = 1; i < m; i++) {
    runDsd(0, i);
  }
  if (false) {
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        printf("(%d,%d) in dsd %d ind= %d sum_until=%d\t", i, j, dsdid[i][j],
               dsdind[i][j], dsdsum[dsdid[i][j]][dsdind[i][j]]);
      }
      printf("\n");
    }
  }
  proceedL();
  proceedR();
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      f[k - 1][k - 1] +=
          a[i][j] * max(0ll, k - abs(i - (k - 1)) - abs(j - (k - 1)));
    }
  }
  if (false) cout << "ini=" << f[k - 1][k - 1] << endl;
  for (int i = k - 1; i <= n - k; i++) {
    for (int j = k; j <= m - k; j++) {
      long long p1 = f[i][j - 1];
      long long p2 = tri[R][i][j];
      long long p3 = tri[L][i][j - 1];
      if (false)
        cout << "F " << i << " " << j << "=" << p1 << "+" << p2 << "-" << p3
             << endl;
      f[i][j] = p1 + p2 - p3;
    }
    if (i == n - k) {
      continue;
    }
    long long upt = 0, downt = 0;
    int up = k - 1;
    for (int j = i; j >= i - k + 1; j--) {
      upt += getRS(j, k - 1 - up, k - 1 + up);
      up--;
    }
    int down = k - 1;
    for (int j = i + 1; j <= i + k; j++) {
      downt += getRS(j, k - 1 - down, k - 1 + down);
      down--;
    }
    if (false)
      cout << "F:" << i + 1 << " " << k - 1 << "=" << f[i][k - 1] << " " << upt
           << " " << downt << endl;
    f[i + 1][k - 1] = f[i][k - 1] - upt + downt;
  }
  int x = k - 1, y = k - 1;
  for (int i = k - 1; i <= n - k; i++) {
    for (int j = k - 1; j <= m - k; j++) {
      if (f[i][j] > f[x][y]) {
        x = i;
        y = j;
      }
    }
  }
  cout << x + 1 << " " << y + 1 << endl;
  return 0;
}