#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
void writeln(long long x) {
  write(x);
  puts("");
}
const long long N = 1010;
long long n, m, k, a[N][N], b[N][N], c[N][N], d[N][N], rt[N][N], e[N][N],
    RT[N][N], answ, ans, cur, x = k, y = k, rt1[N][N], RT1[N][N], lbc[N][N];
long long calc() {
  long long ans = 0;
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j)
      ans += a[i][j] * max(0LL, k - abs(i - k) - abs(j - k));
  return ans;
}
void init(long long rt[][N], long long RT[][N]) {
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j) {
      b[i][j] = b[i - 1][j - 1] + a[i][j];
      c[i][j] = c[i - 1][j] + a[i][j];
      d[i][j] = d[i - 1][j + 1] + a[i][j];
      e[i][j] = e[i][j - 1] + a[i][j];
    }
  for (long long i = k; i <= m - k + 1; ++i) {
    long long ls = i - k + 1, rs = i + k - 1;
    for (long long j = 1; j <= n - k + 1; ++j) {
      if (j > k)
        rt[j][i] = rt[j - 1][i] + e[j][i + k - 1] - e[j][i - k] -
                   b[j - 1][i + k - 1] - d[j - 1][i - k + 1] + a[j - k][i] +
                   b[j - k - 1][i - 1] + d[j - k - 1][i + 1];
      else
        rt[j][i] = rt[j - 1][i] + e[j][i + j - 1] - e[j][i - j];
    }
    for (long long j = n; j >= k; --j) {
      if (j < n - k + 1)
        RT[j][i] = RT[j + 1][i] + e[j][i + k - 1] - e[j][i - k] + b[j][i - k] +
                   d[j][i + k] + a[j + k][i] - b[j + k][i] - d[j + k][i];
      else
        RT[j][i] =
            RT[j + 1][i] + e[j][i + (n - j + 1) - 1] - e[j][i - (n - j + 1)];
    }
  }
}
int main() {
  n = read();
  m = read();
  k = read();
  x = y = k;
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j) a[i][j] = read();
  init(rt, RT);
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j) lbc[j][i] = a[i][j];
  swap(n, m);
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j) a[i][j] = lbc[i][j];
  init(rt1, RT1);
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j) lbc[j][i] = a[i][j];
  swap(n, m);
  for (long long i = 1; i <= n; ++i)
    for (long long j = 1; j <= m; ++j) a[i][j] = lbc[i][j];
  for (long long j = k; j <= m - k + 1; ++j)
    for (long long i = k; i <= n - k + 1; ++i) {
      if (i == k && j == k)
        ans = calc(), cur = ans, answ = max(answ, ans);
      else if (i == k)
        ans = cur + RT1[j][i] - rt1[j - 1][i], cur = ans,
        answ < ans ? (x = i, y = j, 0) : 0, answ = max(answ, ans);
      else
        ans = ans + RT[i][j] - rt[i - 1][j], answ < ans ? (x = i, y = j, 0) : 0,
        answ = max(answ, ans);
    }
  printf("%I64d %I64d\n", x, y);
}
