#include <bits/stdc++.h>
using namespace std;
class Array2D {
  vector<vector<int> > _array;
  int _k;
  vector<vector<int64_t> > _memo, _memoUp, _memoDown, _memoLeft, _memoRight;

 public:
  Array2D(int n, int m, int k)
      : _array(n, vector<int>(m)),
        _k(k),
        _memo(n, vector<int64_t>(m, -1)),
        _memoUp(n, vector<int64_t>(m, -1)),
        _memoDown(n, vector<int64_t>(m, -1)),
        _memoLeft(n, vector<int64_t>(m, -1)),
        _memoRight(n, vector<int64_t>(m, -1)) {}
  pair<int, int> calc() {
    pair<int, int> p = make_pair(_k, _k);
    int64_t m = 0;
    for (int i = _k - 1; i <= _array.size() - _k; ++i)
      for (int j = _k - 1; j <= _array[i].size() - _k; ++j) {
        auto r = rhombusWeighted(i, j);
        if (m < r) {
          m = r;
          p.first = i + 1, p.second = j + 1;
        }
      }
    return p;
  }
  vector<int> &operator[](int i) { return _array[i]; }
  int64_t rhombusWeighted(int x, int y) {
    if (_memo[x][y] >= 0) return _memo[x][y];
    if (x == _k - 1 && y == _k - 1) {
      int64_t sum = 0;
      for (int i = 0; i < _array.size(); ++i)
        for (int j = 0; j < _array[i].size(); ++j)
          sum += _array[i][j] * max(0, _k - abs(i - x) - abs(j - y));
      assert(sum >= 0);
      return _memo[x][y] = sum;
    }
    if (x == _k - 1) {
      _memo[x][y] = rhombusWeighted(x, y - 1) - rhombusLeft(x, y - 1) +
                    rhombusRight(x, y);
      assert(_memo[x][y] >= 0);
      return _memo[x][y];
    }
    _memo[x][y] =
        rhombusWeighted(x - 1, y) - rhombusUp(x - 1, y) + rhombusDown(x, y);
    assert(_memo[x][y] >= 0);
    return _memo[x][y];
  }
  int64_t rhombusUp(int x, int y) {
    if (_memoUp[x][y] >= 0) return _memoUp[x][y];
    if (x == _k - 1) {
      int64_t sum = 0;
      for (int i = 1 - _k + x; i <= x; ++i)
        for (int j = 1 - _k + y; j <= _k - 1 + y; ++j)
          if (abs(i - x) + abs(j - y) < _k) sum += _array[i][j];
      assert(sum >= 0);
      return _memoUp[x][y] = sum;
    }
    _memoUp[x][y] = rhombusUp(x - 1, y) - frameUp(x - 1, y) + horizontal(x, y);
    assert(_memoUp[x][y] >= 0);
    return _memoUp[x][y];
  }
  int64_t rhombusDown(int x, int y) {
    if (_memoDown[x][y] >= 0) return _memoDown[x][y];
    if (x == _k - 1) {
      int64_t sum = 0;
      for (int i = x; i <= x + _k - 1; ++i)
        for (int j = 1 - _k + y; j <= _k - 1 + y; ++j)
          if (abs(i - x) + abs(j - y) < _k) sum += _array[i][j];
      assert(sum >= 0);
      return _memoDown[x][y] = sum;
    }
    _memoDown[x][y] =
        rhombusDown(x - 1, y) - horizontal(x - 1, y) + frameDown(x, y);
    assert(_memoDown[x][y] >= 0);
    return _memoDown[x][y];
  }
  int64_t rhombusLeft(int x, int y) {
    if (_memoLeft[x][y] >= 0) return _memoLeft[x][y];
    if (y == _k - 1) {
      int64_t sum = 0;
      for (int i = 1 - _k; i <= _k - 1; ++i)
        for (int j = 1 - _k; j <= 0; ++j)
          if (abs(i) + abs(j) < _k) sum += _array[x + i][y + j];
      return _memoLeft[x][y] = sum;
    }
    return _memoLeft[x][y] =
               rhombusLeft(x, y - 1) - frameLeft(x, y - 1) + vertical(x, y);
  }
  int64_t rhombusRight(int x, int y) {
    if (_memoRight[x][y] >= 0) return _memoRight[x][y];
    if (y == _k - 1) {
      int64_t sum = 0;
      for (int i = 1 - _k; i <= _k - 1; ++i)
        for (int j = 0; j <= _k - 1; ++j)
          if (abs(i) + abs(j) < _k) sum += _array[x + i][y + j];
      return _memoRight[x][y] = sum;
    }
    return _memoRight[x][y] =
               rhombusRight(x, y - 1) - vertical(x, y - 1) + frameRight(x, y);
  }
  int64_t frameLeft(int x, int y) {
    int64_t sum = 0;
    for (int i = 1 - _k; i < 0; ++i) sum += _array[x + i][y - i + 1 - _k];
    for (int i = 0; i <= _k - 1; ++i) sum += _array[x + i][y + i + 1 - _k];
    return sum;
  }
  int64_t frameRight(int x, int y) {
    int64_t sum = 0;
    for (int i = 1 - _k; i < 0; ++i) sum += _array[x + i][y + i - 1 + _k];
    for (int i = 0; i <= _k - 1; ++i) sum += _array[x + i][y - i - 1 + _k];
    return sum;
  }
  int64_t frameUp(int x, int y) {
    int64_t sum = 0;
    for (int j = 1 - _k; j < 0; ++j) sum += _array[x - j - _k + 1][y + j];
    for (int j = 0; j <= _k - 1; ++j) sum += _array[x + j - _k + 1][y + j];
    return sum;
  }
  int64_t frameDown(int x, int y) {
    int64_t sum = 0;
    for (int j = 1 - _k; j < 0; ++j) sum += _array[x + j + _k - 1][y + j];
    for (int j = 0; j <= _k - 1; ++j) sum += _array[x - j + _k - 1][y + j];
    return sum;
  }
  int64_t horizontal(int x, int y) {
    int64_t sum = 0;
    for (int j = 1 - _k; j <= _k - 1; ++j) sum += _array[x][y + j];
    return sum;
  }
  int64_t vertical(int x, int y) {
    int64_t sum = 0;
    for (int i = 1 - _k; i <= _k - 1; ++i) sum += _array[x + i][y];
    return sum;
  }
};
pair<int, int> parse(istream &in) {
  int n, m, k;
  in >> n >> m >> k;
  Array2D a(n, m, k);
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      in >> a[i][j];
    }
  }
  return a.calc();
}
void solve(istream &in, ostream &out) {
  auto p = parse(in);
  out << p.first << ' ' << p.second << endl;
}
int main() {
  solve(cin, cout);
  return 0;
}
