#include <bits/stdc++.h>
long long o[2 * 1005][2 * 1005], s[1005 * 2][1005 * 2];
long long sum(int xl, int xr, int yl, int yr) {
  return s[xr][yr] - s[xl - 1][yr] - s[xr][yl - 1] + s[xl - 1][yl - 1];
}
int main(int argc, char *argv[]) {
  int n, m, k, a;
  scanf("%d%d%d", &n, &m, &k);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; ++j) {
      scanf("%d", &a);
      o[i + j][i + m - j] = a;
    }
  for (int i = 1; i <= n + m; ++i)
    for (int j = 1; j <= m + n; ++j)
      s[i][j] = s[i - 1][j] + s[i][j - 1] - s[i - 1][j - 1] + o[i][j];
  long long tmp = -1, tot = -1;
  int xi, xj;
  for (int i = k; i <= n - k + 1; ++i)
    for (int j = k; j <= m - k + 1; ++j) {
      tmp = 0;
      for (int r = 0; r < k; ++r) {
        tmp += sum(i + j - r, i + j + r, i + m - j - r, i + m - j + r);
      }
      if (tot < tmp) {
        tot = tmp;
        xi = i;
        xj = j;
      }
    }
  printf("%d %d", xi, xj);
  return EXIT_SUCCESS;
}
