#include <bits/stdc++.h>
using namespace std;
int n, m, k;
long long a[1010][1010];
long long calc(int x1, int y1, int x2, int y2) {
  return a[x2][y2] + a[x1 - 1][y1 - 1] - a[x2][y1 - 1] - a[x1 - 1][y2];
}
int main() {
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) scanf("%I64d", &a[i][j]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) a[i][j] += a[i - 1][j];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) a[i][j] += a[i][j - 1];
  long long ans = 0;
  int ansa = k, ansb = 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 += calc(i - k + h, j - h + 1, i - h + k, j - 1 + h);
      if (tmp > ans) ans = tmp, ansa = i, ansb = j;
    }
  printf("%d %d\n", ansa, ansb);
  return 0;
}
