#include <bits/stdc++.h>
using namespace std;
long long a[1005][1005], f[1005][1005], sx[1005][1005], sy[1005][1005];
long i, j, k, p, m, n;
long ax, ay;
long long l;
inline long long max(long long a, long long b) { return (a > b) ? a : b; }
int main() {
  memset(sx, 0, sizeof(sx));
  memset(sy, 0, sizeof(sy));
  cin >> n >> m >> k;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= m; j++) {
      scanf("%ld", &a[i][j]);
      sx[i][j] = sx[i][j - 1] + a[i][j];
      sy[i][j] = sy[i - 1][j] + a[i][j];
    }
  ax = ay = k;
  l = 0;
  long x = k, y = k;
  x = k;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      f[x][y] += a[i][j] * max(0, k - abs(i - x) - abs(j - y));
      if (f[x][y] > l) {
        l = f[x][y];
        ax = x;
        ay = y;
      }
    }
  }
  {
    for (y = k + 1; y <= m - k + 1; y++) {
      f[x][y] = f[x][y - 1];
      long yy = y - 1;
      for (i = yy - k + 1; i <= yy; i++) {
        long t1;
        t1 = k - abs(yy - i);
        f[x][y] = f[x][y] - (sy[t1 + x - 1][i] - sy[x - t1][i]);
      }
      for (i = y; i <= y + k - 1; i++) {
        long t1;
        t1 = k - abs(y - i);
        f[x][y] = f[x][y] + (sy[t1 + x - 1][i] - sy[x - t1][i]);
      }
      if (f[x][y] > l) {
        l = f[x][y];
        ax = x;
        ay = y;
      }
    }
  }
  for (x = k + 1; x <= n - k + 1; x++) {
    y = k;
    f[x][y] = f[x - 1][y];
    long xx = x - 1;
    for (i = xx - k + 1; i <= xx; i++) {
      long t1;
      t1 = k - abs(xx - i);
      f[x][y] = f[x][y] - (sx[i][y + t1 - 1] - sx[i][y - t1]);
    }
    for (i = x; i <= x + k - 1; i++) {
      long t1;
      t1 = k - abs(x - i);
      f[x][y] = f[x][y] + (sx[i][t1 + y - 1] - sx[i][y - t1]);
    }
    if (f[x][y] > l) {
      l = f[x][y];
      ax = x;
      ay = y;
    }
    for (y = k + 1; y <= m - k + 1; y++) {
      f[x][y] = f[x][y - 1];
      long yy = y - 1;
      for (i = yy - k + 1; i <= yy; i++) {
        long t1;
        t1 = k - abs(yy - i);
        f[x][y] = f[x][y] - (sy[t1 + x - 1][i] - sy[x - t1][i]);
      }
      for (i = y; i <= y + k - 1; i++) {
        long t1;
        t1 = k - abs(y - i);
        f[x][y] = f[x][y] + (sy[t1 + x - 1][i] - sy[x - t1][i]);
      }
      if (f[x][y] > l) {
        l = f[x][y];
        ax = x;
        ay = y;
      }
    }
  }
  cout << ax << ' ' << ay << endl;
  return 0;
}
