#include <bits/stdc++.h>
using namespace std;
long long ans, tot, cnt, s[1050][1050][4], t[1050][1050], le, ri, Le, Ri, up,
    dn;
int S, T, n, m, p;
inline int Read() {
  int x = 0;
  char y;
  do y = getchar();
  while (y < '0' || y > '9');
  do x = x * 10 + y - '0', y = getchar();
  while (y >= '0' && y <= '9');
  return x;
}
void Solve() {
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      if (p - abs(i - p) - abs(j - p) > 0) {
        cnt += t[i][j] * (p - abs(i - p) - abs(j - p));
        if (j <= p)
          le += t[i][j];
        else
          ri += t[i][j];
        if (i <= p)
          up += t[i][j];
        else
          dn += t[i][j];
      }
  S = p;
  T = p;
  ans = cnt;
  Le = le;
  Ri = ri;
  tot = cnt;
  for (int i = p; i <= n - p + 1; i++)
    for (int j = p; j <= m - p + 1; j++)
      if (i == p && j == p)
        continue;
      else if (j != p) {
        cnt += -le + ri;
        long long k = s[i][j + p - 1][2] - s[i - p + 1][j][2] +
                      s[i + p - 2][j + 1][3] - s[i][j + p - 1][3];
        long long l = s[i + p - 2][j][1] - s[i - p + 1][j][1];
        ri += k - l;
        cnt += k + t[i - p + 1][j] + t[i + p - 1][j];
        le -= s[i][j - p][3] - s[i - p][j][3];
        le -= s[i + p - 1][j - 1][2] - s[i][j - p][2];
        le += s[i + p - 1][j][1] - s[i - p][j][1];
        if (cnt > ans) ans = cnt, S = i, T = j;
      } else {
        Le += s[i + p - 1][j][2] - s[i - 1][j - p][2] - s[i - 1][j - p + 1][3] +
              s[i - p - 1][j + 1][3];
        Ri += s[i + p - 2][j + 1][3] - s[i - 1][j + p][3] -
              s[i - 1][j + p - 1][2] + s[i - p][j][2];
        cnt = tot + dn - up;
        le = Le;
        ri = Ri;
        long long k = s[i + p - 1][j][2] - s[i - 1][j - p][2] +
                      s[i + p - 1][j][3] - s[i - 1][j + p][3] - t[i + p - 1][j];
        dn += k;
        cnt += k;
        long long l = s[i][j + p - 1][0] - s[i][j - p][0];
        dn -= l;
        up += l;
        up -= s[i - 1][j - p + 1][3] - s[i - p - 1][j + 1][3] +
              s[i - 1][j + p - 1][2] - s[i - p - 1][j - 1][2] - t[i - p][j];
        if (cnt > ans) ans = cnt, S = i, T = j;
        tot = cnt;
      }
}
int main() {
  n = Read();
  m = Read();
  p = Read();
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) t[i][j] = Read();
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      s[i][j][0] = s[i][j - 1][0] + t[i][j],
      s[i][j][1] = s[i - 1][j][1] + t[i][j],
      s[i][j][2] = s[i - 1][j - 1][2] + t[i][j],
      s[i][j][3] = s[i - 1][j + 1][3] + t[i][j];
  Solve();
  cout << S << ' ' << T << endl;
  return 0;
}
