#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
int n, m, k, X, Y;
long long gragh[N][N];
long long ans = 0;
long long doit(int x, int y, int xx, int yy) {
  return gragh[xx][yy] + gragh[x - 1][y - 1] - gragh[xx][y - 1] -
         gragh[x - 1][yy];
}
int main() {
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      scanf("%d", &gragh[i][j]);
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      gragh[i][j] += gragh[i - 1][j];
    }
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= m; ++j) {
      gragh[i][j] += gragh[i][j - 1];
    }
  }
  X = k, Y = k;
  for (int i = k; i <= n - k + 1; ++i) {
    for (int j = k; j <= m - k + 1; ++j) {
      long long tmp = 0;
      for (int h = 1; h <= k; ++h) {
        tmp += doit(i - k + h, j - h + 1, i - h + k, j - 1 + h);
      }
      if (tmp > ans) {
        ans = tmp, X = i, Y = j;
      }
    }
  }
  printf("%d %d\n", X, Y);
  return 0;
}
