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;
struct Solver {
  const vector<vector<int> > &a;
  int k;
  bool initLeftTop;
  Solver(const vector<vector<int> > &a, int k)
      : a(a), k(k), initLeftTop(false) {}
  pair<int, int> solve() {
    int n = a.size(), m = a[0].size();
    int x, y;
    int64_t p = -1;
    vector<vector<int64_t> > dp(n - k + 1, vector<int64_t>(m - k + 1));
    dp[k - 1][k - 1] = top(k - 1, k - 1) + bottom(k - 1, k - 1);
    for (int j = k; j < m - k + 1; j++)
      dp[k - 1][j] = dp[k - 1][j - 1] - leftTriangle(k - 1, j - 1) +
                     rightTriangle(k - 1, j);
    for (int i = k; i < n - k + 1; i++) {
      for (int j = k - 1; j < m - k + 1; j++)
        dp[i][j] = dp[i - 1][j] - topTriangle(i - 1, j) + bottomTriangle(i, j);
    }
    for (int i = k - 1; i < n - k + 1; i++) {
      for (int j = k - 1; j < m - k + 1; j++) {
        auto c = dp[i][j];
        if (p < c) {
          p = c;
          x = i, y = j;
        }
      }
    }
    return make_pair(x, y);
  }
  vector<vector<int64_t> > lt;
  int64_t leftTriangle(int x, int y) {
    if (lt.empty()) {
      int n = a.size(), m = a[0].size();
      lt.resize(n, vector<int64_t>(m));
      for (int ii = 0; ii < k; ii++)
        for (int jj = 0; jj < k; jj++)
          if (ii + jj >= k - 1) {
            lt[x][y] += a[ii + x - k + 1][jj - k + 1 + y];
          }
      for (int ii = 1; ii < k; ii++)
        for (int jj = 0; jj < k; jj++)
          if (-ii + jj >= 0) {
            lt[x][y] += a[ii + x][jj - k + 1 + y];
          }
      for (int jj = k; jj < m - k + 1; jj++) {
        lt[x][jj] = lt[x][jj - 1];
        for (int ii = 0; ii < k; ii++) {
          lt[x][jj] -= a[x + ii - k + 1][jj - 1 - ii];
        }
        for (int ii = 1; ii < k; ii++) {
          lt[x][jj] -= a[x + ii][jj - k + ii];
        }
        lt[x][jj] += vertical(x, jj);
      }
      for (int i = x + 1; i < n - k + 1; i++) {
        for (int j = y; j < m - k + 1; j++) {
          lt[i][j] = lt[i - 1][j];
          lt[i][j] -= a[i - k][j];
          lt[i][j] += a[i][j - k + 1];
        }
      }
    }
    return lt[x][y];
  }
  vector<vector<int64_t> > rt;
  int64_t rightTriangle(int x, int y) {
    if (rt.empty()) {
      int n = a.size(), m = a[0].size();
      rt.resize(n, vector<int64_t>(m));
      for (int ii = 0; ii < k; ii++)
        for (int jj = 0; jj < k; jj++)
          if (ii - jj >= 0) {
            rt[x][y] += a[ii + x - k + 1][jj + y];
          }
      for (int ii = 1; ii < k; ii++)
        for (int jj = 0; jj < k; jj++)
          if (ii + jj < k) {
            rt[x][y] += a[ii + x][jj + y];
          }
      for (int jj = y + 1; jj < m - k + 1; jj++) {
        rt[x][jj] = rt[x][jj - 1];
        rt[x][jj] -= vertical(x, jj - 1);
        for (int ii = 0; ii < k; ii++) {
          rt[x][jj] += a[x + ii - k + 1][jj + ii];
        }
        for (int ii = 1; ii < k; ii++) {
          rt[x][jj] += a[x + ii][jj + k - 1 - ii];
        }
      }
      for (int i = x + 1; i < n - k + 1; i++) {
        for (int j = y; j < m - k + 1; j++) {
          rt[i][j] = rt[i - 1][j];
          for (int ii = 0; ii < k; ii++) {
            rt[i][j] -= a[i - k + ii][j + ii];
          }
          for (int ii = 0; ii < k; ii++) {
            rt[i][j] += a[i + ii][j + k - 1 - ii];
          }
        }
      }
    }
    return rt[x][y];
  }
  vector<vector<int64_t> > tt;
  int64_t topTriangle(int x, int y) {
    if (tt.empty()) {
      int n = a.size(), m = a[0].size();
      tt.resize(n - k + 1, vector<int64_t>(m - k + 1));
      for (int i = x; i < n - k + 1; i++) {
        for (int j = y; j < m - k + 1; j++) {
          if (i == x) {
            if (j == y) {
              for (int ii = 0; ii < k - 1; ii++)
                for (int jj = 0; jj < ii * 2 + 1; jj++)
                  tt[x][y] += a[ii - k + 1 + x][y - ii + jj];
              tt[x][y] += horizon(x, y);
            } else {
              tt[x][j] = tt[x][j - 1] - topToLeft(x - k + 1, j - 1) +
                         topToRight(x - k + 1, j);
            }
          } else {
            tt[i][j] = tt[i - 1][j];
            tt[i][j] -= topToLeft(i - k, j);
            tt[i][j] -= topToRight(i - k, j);
            tt[i][j] += horizon(i, j) + a[i - k][j];
          }
        }
      }
    }
    return tt[x][y];
  }
  vector<vector<int64_t> > bt;
  int64_t bottomTriangle(int x, int y) {
    if (bt.empty()) {
      int n = a.size(), m = a[0].size();
      bt.resize(n - k + 1, vector<int64_t>(m - k + 1));
      for (int i = x; i < n - k + 1; i++) {
        for (int j = y; j < m - k + 1; j++) {
          if (i == x && j == y)
            for (int ii = 0; ii < k; ii++)
              for (int jj = 0; jj < k * 2 - 1 - ii * 2; jj++)
                bt[x][y] += a[ii + x][-k + 1 + jj + ii + y];
          else if (i == x) {
            bt[x][j] = bt[x][j - 1];
            bt[x][j] -= topToRight(x, j - k);
            bt[x][j] += topToLeft(x, j + k - 1);
          } else
            bt[i][j] = bt[i - 1][j] + topToRight(i, j - k + 1) +
                       topToLeft(i, j + k - 1) - a[i + k - 1][j] -
                       horizon(i - 1, j);
        }
      }
    }
    return bt[x][y];
  }
  vector<vector<int64_t> > hz;
  int64_t horizon(int x, int y) {
    if (hz.empty()) {
      int n = a.size(), m = a[0].size();
      hz.resize(n, vector<int64_t>(m));
      for (int i = x; i < n - k + 1; i++) {
        for (int jj = 0; jj < k * 2 - 1; jj++) hz[i][y] += a[i][jj - k + 1 + y];
        for (int jj = y + 1; jj < m - k + 1; jj++) {
          hz[i][jj] = hz[i][jj - 1] - a[i][jj - k] + a[i][jj + k - 1];
        }
      }
    }
    return hz[x][y];
  }
  vector<vector<int64_t> > vt;
  int64_t vertical(int x, int y) {
    if (vt.empty()) {
      int n = a.size(), m = a[0].size();
      vt.resize(n, vector<int64_t>(m));
      for (int i = x; i < n - k + 1; i++) {
        for (int j = y; j < m - k + 1; j++) {
          if (i == x) {
            for (int ii = 0; ii < k * 2 - 1; ii++)
              vt[i][j] += a[i - k + 1 + ii][j];
          } else {
            vt[i][j] = vt[i - 1][j] - a[i - k][j] + a[i + k - 1][j];
          }
        }
      }
    }
    return vt[x][y];
  }
  vector<vector<int64_t> > tl;
  int64_t topToLeft(int x, int y) {
    if (tl.empty()) {
      int n = a.size(), m = a[0].size();
      tl.resize(n, vector<int64_t>(m));
      for (int i = 0; i < n - k + 1; i++) {
        for (int j = 0; j < m; j++) {
          if (i == 0 || j == m - 1) {
            for (int ii = 0; ii < k; ii++) tl[i][j] += a[i + ii][j - ii];
          } else {
            tl[i][j] =
                tl[i - 1][j + 1] - a[i - 1][j + 1] + a[i + k - 1][j - k + 1];
          }
        }
      }
    }
    return tl[x][y];
  }
  vector<vector<int64_t> > tr;
  int64_t topToRight(int x, int y) {
    if (tr.empty()) {
      int n = a.size(), m = a[0].size();
      tr.resize(n, vector<int64_t>(m));
      for (int i = 0; i < n - k + 1; i++) {
        for (int j = 0; j < m - k + 1; j++) {
          if (i == 0 || j == 0) {
            for (int ii = 0; ii < k; ii++) tr[i][j] += a[i + ii][j + ii];
          } else {
            tr[i][j] =
                tr[i - 1][j - 1] - a[i - 1][j - 1] + a[i + k - 1][j + k - 1];
          }
        }
      }
    }
    return tr[x][y];
  }
  int64_t top(int i, int j) {
    if (j == k - 1) {
      auto res = leftTop(i, j) + rightTop(i, j);
      return res;
    }
    return top(i, j - 1) - leftTopTriangle(i, j - 1, k) +
           rightTopTriangle(i, j, k);
  }
  int64_t bottom(int i, int j) { return leftBottom(i, j) + rightBottom(i, j); }
  int64_t leftTop(int i, int j) {
    int64_t res = 0;
    for (int l = 1; l <= k; l++) res += leftTopTriangle(i, j, l);
    return res;
  }
  int64_t rightTop(int i, int j) {
    int64_t res = 0;
    for (int l = 1; l <= k; l++) res += rightTopTriangle(i, j, l);
    return res;
  }
  int64_t leftBottom(int i, int j) {
    int64_t res = 0;
    for (int l = 1; l <= k; l++) res += leftBottomTriangle(i, j, l);
    return res;
  }
  int64_t rightBottom(int i, int j) {
    int64_t res = 0;
    for (int l = 1; l <= k; l++) res += rightBottomTriangle(i, j, l);
    return res;
  }
  int64_t leftTopTriangle(int x, int y, int l) {
    int64_t res = 0;
    for (int ii = 0; ii < l; ii++)
      for (int jj = 0; jj < l; jj++)
        if (ii + jj < l) res += a[x - ii][y - jj];
    return res;
  }
  int64_t rightTopTriangle(int i, int j, int l) {
    int64_t res = 0;
    for (int ii = 0; ii < l; ii++)
      for (int jj = 1; jj < l; jj++)
        if (ii - jj >= 0) res += a[ii - l + 1 + i][jj + j];
    return res;
  }
  int64_t leftBottomTriangle(int i, int j, int l) {
    int64_t res = 0;
    for (int ii = 1; ii < l; ii++)
      for (int jj = 0; jj < l; jj++)
        if (-ii + jj >= 0) res += a[ii + i][jj - l + 1 + j];
    return res;
  }
  int64_t rightBottomTriangle(int i, int j, int l) {
    int64_t res = 0;
    for (int ii = 1; ii < l; ii++)
      for (int jj = 1; jj < l; jj++)
        if (ii + jj < l) res += a[ii + i][jj + j];
    return res;
  }
};
void solve(istream &in, ostream &out) {
  int n, m, k;
  in >> n >> m >> k;
  vector<vector<int> > a(n, vector<int>(m));
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) in >> a[i][j];
  auto c = Solver(a, k);
  auto ans = c.solve();
  out << ans.first + 1 << ' ' << ans.second + 1 << endl;
}
int main() {
  solve(cin, cout);
  return 0;
}