Problem: You've got a table of size n × m. On the intersection of the i-th row (1 ≤ i ≤ n) and the j-th column (1 ≤ j ≤ m) there is a non-negative integer ai, j. Besides, you've got a non-negative integer k.

Your task is to find such pair of integers (a, b) that meets these conditions: 

  * k ≤ a ≤ n - k + 1; 
  * k ≤ b ≤ m - k + 1; 
  * let's denote the maximum of the function <image> among all integers x and y, that satisfy the inequalities k ≤ x ≤ n - k + 1 and k ≤ y ≤ m - k + 1, as mval; for the required pair of numbers the following equation must hold f(a, b) = mval. 

Input

The first line contains three space-separated integers n, m and k (1 ≤ n, m ≤ 1000, <image>). Next n lines each contains m integers: the j-th number on the i-th line equals ai, j (0 ≤ ai, j ≤ 106).

The numbers in the lines are separated by spaces.

Output

Print the required pair of integers a and b. Separate the numbers by a space.

If there are multiple correct answers, you are allowed to print any of them.

Examples

Input

4 4 2
1 2 3 4
1 1 1 1
2 2 2 2
4 3 2 1


Output

3 2


Input

5 7 3
8 2 3 4 2 3 3
3 4 6 2 3 4 6
8 7 6 8 4 5 7
1 2 3 2 1 3 2
4 5 3 2 1 2 1


Output

3 3

Solution (in CPP):

Solution:
#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;
}