#include <bits/stdc++.h>
using namespace std;
inline int getint() {
  char ch = getchar();
  int res = 0, sign = 1;
  if (ch == '-') sign = -1;
  while (ch < '0' || '9' < ch) {
    ch = getchar();
    if (ch == '-') sign = -1;
  }
  while ('0' <= ch && ch <= '9') {
    res = res * 10 + ch - '0';
    ch = getchar();
  }
  return res * sign;
}
int n, m;
long long k, ans = 0;
int a[2007][2007];
long long f[2007][2007];
int l[2007][2007], r[2007][2007], d[2007][2007], u[2007][2007];
int lh[2007][2007], rh[2007][2007], col[2007][2007], row[2007][2007];
queue<pair<int, int> > q;
long long dis(int a, int b, int c, int d) { return abs(a - c) + abs(b - d); }
long long doWn(int x, int y) {
  long long res = f[x + k][y + k];
  res = f[x + k][y + k] - u[x + k][y + k] + d[x + 1 + k][y + k];
  return res;
}
long long riGht(int x, int y) {
  long long res = f[x + k][y + k];
  res = f[x + k][y + k] - l[x + k][y + k] + r[x + k][y + 1 + k];
  return res;
}
void BFS() {
  pair<int, int> tp, tt;
  tp.first = k;
  tp.second = k;
  q.push(tp);
  while (!q.empty()) {
    tp = q.front();
    q.pop();
    tt = tp;
    tt.first++;
    if (tt.first <= n - k + 1 && f[tt.first + k][tt.second + k] == 0) {
      f[tt.first + k][tt.second + k] = doWn(tp.first, tp.second);
      ans = max(ans, f[tt.first + k][tt.second + k]);
      q.push(tt);
    }
    tt = tp;
    tt.second++;
    if (tt.second <= m - k + 1 && f[tt.first + k][tt.second + k] == 0) {
      f[tt.first + k][tt.second + k] = riGht(tp.first, tp.second);
      ans = max(ans, f[tt.first + k][tt.second + k]);
      q.push(tt);
    }
  }
  return;
}
void init() {
  n += k;
  m += k;
  for (int i = -k; i <= n; i++) {
    for (int j = -k; j <= m; j++) {
      rh[i + k][j + k] = a[i + k][j + k] + rh[i - 1 + k][j - 1 + k];
      lh[i + k][j + k] = a[i + k][j + k] + lh[i - 1 + k][j + 1 + k];
      col[i + k][j + k] = a[i + k][j + k] + col[i - 1 + k][j + k];
      row[i + k][j + k] = a[i + k][j + k] + row[i + k][j - 1 + k];
    }
  }
  n -= k;
  m -= k;
  long long s1, s2;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      u[i + k][j + k] = u[i - 1 + k][j + k];
      s1 = lh[i - 1 + k][j - k + 1 + k] - lh[i - k - 1 + k][j + 1 + k];
      s2 = rh[i - 1 + k][j + k - 1 + k] - rh[i - k - 1 + k][j - 1 + k];
      u[i + k][j + k] -= s1 + s2 - a[i - k + k][j + k];
      u[i + k][j + k] += row[i + k][j + k - 1 + k] - row[i + k][j - k + k];
      l[i + k][j + k] = l[i + k][j - 1 + k];
      s1 = lh[i + k][j - k + k] - lh[i - k + 1 - 1 + k][j - 1 + 1 + k];
      s2 = rh[i + k - 1 + k][j - 1 + k] - rh[i - 1 + k][j - k - 1 + k];
      l[i + k][j + k] -= s1 + s2 - a[i + k][j - k + k];
      l[i + k][j + k] += col[i + k - 1 + k][j + k] - col[i - k + k][j + k];
    }
  }
  for (int i = n; i > 0; i--) {
    for (int j = m; j > 0; j--) {
      d[i + k][j + k] = d[i + 1 + k][j + k];
      s1 = rh[i + k + k][j + k] - rh[i + 1 - 1 + k][j - k + 1 - 1 + k];
      s2 = lh[i + k + k][j + k] - lh[i + 1 - 1 + k][j + k - 1 + 1 + k];
      d[i + k][j + k] -= s1 + s2 - a[i + k + k][j + k];
      d[i + k][j + k] += row[i + k][j + k - 1 + k] - row[i + k][j - k + k];
      r[i + k][j + k] = r[i + k][j + 1 + k];
      s1 = rh[i + k][j + k + k] - rh[i - k + 1 - 1 + k][j + 1 - 1 + k];
      s2 = lh[i + k - 1 + k][j + 1 + k] - lh[i - 1 + k][j + k + 1 + k];
      r[i + k][j + k] -= s1 + s2 - a[i + k][j + k + k];
      r[i + k][j + k] += col[i + k - 1 + k][j + k] - col[i - k + k][j + k];
    }
  }
  return;
}
int main() {
  n = getint();
  m = getint();
  k = getint();
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      a[i + k][j + k] = getint();
    }
  }
  init();
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      long long diss = min(k, abs(k - i) + abs(k - j));
      f[k + k][k + k] += (k - diss) * a[i + k][j + k];
    }
  }
  ans = f[k + k][k + k];
  BFS();
  for (int i = k; i + k <= n + 1; i++) {
    for (int j = k; j + k <= m + 1; j++) {
      if (f[i + k][j + k] == ans) {
        printf("%d %d\n", i, j);
        return 0;
      }
    }
  }
}
