#include <bits/stdc++.h>
const int inf = 1039074182;
using namespace std;
long long n, m, k;
long long a[1005][1005];
long long tmp[1005];
long long sumzhi[2][1005][1005];
long long sumzhu[2005][1005];
long long sumfu[2005][1005];
long long trans[2][1005][1005];
long long tmp2d[1005][1005];
long long bow[1005][1005];
long long tower[2][1005][1005];
long long poszhu[1005][1005];
long long posfu[1005][1005];
long long res[1005][1005];
const long long basic = 1000;
inline long long getzhu(long long x, long long y) { return x - y + basic; }
inline long long getfu(long long x, long long y) { return x + y - n + basic; }
inline bool out(long long x, long long y) {
  return (x < 0 || y < 0 || x >= n || y >= m);
}
void calcpresum(long long a[], long long sum[], long long n) {
  for (long long i = 0; i < n; i++) {
    sum[i] = (i ? sum[i - 1] : 0) + a[i];
  }
}
long long getintsum(long long sum[], long long l, long long r) {
  return sum[r] - (l ? sum[l - 1] : 0);
}
void gettower(long long a[][1005], long long tower[][1005]) {
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      tower[i][j] = 0;
    }
  }
  for (long long i = 0; i < n; i++) {
    calcpresum(a[i], sumzhi[0][i], m);
  }
  for (long long j = 0; j < m; j++) {
    for (long long i = 0; i < n; i++) {
      tmp[i] = a[i][j];
    }
    calcpresum(tmp, sumzhi[1][j], n);
  }
  for (long long si = 0; si < n; si++) {
    long long len = 0;
    for (long long k = 0; k < n + m; k++) {
      if (out(si + k, k)) break;
      poszhu[si + k][k] = len;
      tmp[len++] = a[si + k][k];
    }
    calcpresum(tmp, sumzhu[getzhu(si, 0)], len);
  }
  for (long long sj = 0; sj < m; sj++) {
    long long len = 0;
    for (long long k = 0; k < n + m; k++) {
      if (out(k, sj + k)) break;
      poszhu[k][sj + k] = len;
      tmp[len++] = a[k][sj + k];
    }
    calcpresum(tmp, sumzhu[getzhu(0, sj)], len);
  }
  for (long long sj = 0; sj < m; sj++) {
    long long len = 0;
    for (long long k = 0; k < n + m; k++) {
      if (out(k, sj - k)) break;
      posfu[k][sj - k] = len;
      tmp[len++] = a[k][sj - k];
    }
    calcpresum(tmp, sumfu[getfu(0, sj)], len);
  }
  for (long long si = 0; si < n; si++) {
    long long len = 0;
    for (long long k = 0; k < n + m; k++) {
      if (out(si + k, m - 1 - k)) break;
      posfu[si + k][m - 1 - k] = len;
      tmp[len++] = a[si + k][m - 1 - k];
    }
    calcpresum(tmp, sumfu[getfu(si, m - 1)], len);
  }
  long long tk = k - 1;
  for (long long i = tk; i < n - k + 1; i++) {
    for (long long j = tk; j < m - 1; j++) {
      bow[i][j] = getintsum(sumzhi[1][j + 1], i - tk, i + tk) -
                  getintsum(sumzhu[getzhu(i, j - tk)], poszhu[i][j - tk],
                            poszhu[i][j - tk] + tk) -
                  getintsum(sumfu[getfu(i, j - tk)], posfu[i][j - tk] - tk,
                            posfu[i][j - tk]) +
                  a[i][j - tk];
    }
  }
  for (long long xAxis = tk; xAxis + tk < n; xAxis++) {
    for (long long j = 0; j < k; j++) {
      tower[xAxis][tk] += getintsum(sumzhi[1][j], xAxis - j, xAxis + j);
    }
    for (long long j = k; j < m; j++) {
      tower[xAxis][j] = tower[xAxis][j - 1] + bow[xAxis][j - 1];
    }
  }
}
void gethalf(long long a[][1005], long long trans[][1005]) {
  gettower(a, tower[0]);
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m / 2; j++) {
      swap(a[i][j], a[i][m - 1 - j]);
    }
  }
  gettower(a, tower[1]);
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m / 2; j++) {
      swap(a[i][j], a[i][m - 1 - j]);
      swap(tower[1][i][j], tower[1][i][m - 1 - j]);
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m - 1; j++) {
      trans[i][j] = -tower[0][i][j] + tower[1][i][j + 1];
    }
  }
}
long long calcf(long long x, long long y) {
  long long res = 0;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      res += a[i][j] * max(0LL, k - abs(i - x) - abs(y - j));
    }
  }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m >> k;
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  gethalf(a, trans[0]);
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      tmp2d[j][i] = a[i][j];
    }
  }
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) {
      a[i][j] = tmp2d[i][j];
    }
  }
  swap(n, m);
  gethalf(a, trans[1]);
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      tmp2d[j][i] = a[i][j];
    }
  }
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) {
      a[i][j] = tmp2d[i][j];
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      tmp2d[j][i] = trans[1][i][j];
    }
  }
  for (long long i = 0; i < m; i++) {
    for (long long j = 0; j < n; j++) {
      trans[1][i][j] = tmp2d[i][j];
    }
  }
  swap(n, m);
  long long tk = k - 1;
  res[tk][tk] = calcf(tk, tk);
  for (long long i = tk + 1; i < n - k + 1; i++) {
    res[i][tk] = res[i - 1][tk] + trans[1][i - 1][tk];
  }
  for (long long i = tk; i < n - k + 1; i++) {
    for (long long j = tk + 1; j < m - k + 1; j++) {
      res[i][j] = res[i][j - 1] + trans[0][i][j - 1];
    }
  }
  long long kx = -1, ky = -1, kmax = -1;
  for (long long i = tk; i < n - k + 1; i++) {
    for (long long j = tk; j < m - k + 1; j++) {
      if (res[i][j] > kmax) {
        kmax = res[i][j];
        kx = i;
        ky = j;
      }
    }
  }
  cout << kx + 1 << ' ' << ky + 1 << endl;
  return 0;
}
