#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1002;
vector<vector<long long> > digl(MAXN, vector<long long>(MAXN));
vector<vector<long long> > digr(MAXN, vector<long long>(MAXN));
vector<vector<long long> > H(MAXN, vector<long long>(MAXN));
vector<vector<long long> > V(MAXN, vector<long long>(MAXN));
int mat[MAXN][MAXN];
long long triangles1[MAXN][MAXN];
long long triangles2[MAXN][MAXN];
long long Rhombus[MAXN][MAXN];
long long result[MAXN][MAXN];
int h, w, k;
long long get_digl_sm(int i, int j, int K) {
  long long sm = 0;
  while (K) K--, sm += mat[i][j], i++, j++;
  return sm;
}
long long get_H_sm(int i, int j, int K) {
  long long sm = 0;
  while (K) K--, sm += mat[i][j], i++;
  return sm;
}
long long get_V_sm(int i, int j, int K) {
  long long sm = 0;
  while (K) K--, sm += mat[i][j], j++;
  return sm;
}
void init(vector<vector<long long> >& dig) {
  for (int i = 0; i < h - k + 1; i++) dig[i][0] = get_digl_sm(i, 0, k);
  for (int i = 0; i < w - k + 1; i++) dig[0][i] = get_digl_sm(0, i, k);
  for (int i = 1; i < h - k + 1; i++)
    for (int j = 1; j < w - k + 1; j++)
      dig[i][j] =
          dig[i - 1][j - 1] - mat[i - 1][j - 1] + mat[i + k - 1][j + k - 1];
}
void initl() { init(digl); }
void initr() {
  for (int i = 0; i < h; i++) reverse(mat[i], mat[i] + w);
  init(digr);
  for (int i = 0; i < h; i++)
    reverse(mat[i], mat[i] + w), reverse(digr[i].begin(), digr[i].begin() + w);
}
void initH() {
  int K = 2 * k - 1;
  for (int j = 0; j < w; j++) H[0][j] = get_H_sm(0, j, K);
  for (int i = 1; i < h - K + 1; i++)
    for (int j = 0; j < w; j++)
      H[i][j] = H[i - 1][j] - mat[i - 1][j] + mat[i + K - 1][j];
}
void initV() {
  int K = 2 * k - 1;
  for (int i = 0; i < h; i++) V[i][0] = get_V_sm(i, 0, K);
  for (int i = 0; i < h; i++)
    for (int j = 1; j < w - K + 1; j++)
      V[i][j] = V[i][j - 1] - mat[i][j - 1] + mat[i][j + K - 1];
}
void step1() {
  initl();
  initr();
  initH();
  initV();
}
long long get_Rhombus_sum(int a, int b) {
  long long sm = 0;
  for (int i = 0; i < h; i++)
    for (int j = 0; j < w; j++)
      sm += mat[i][j] * (long long)max(0, min(1, k - abs(i - a) - abs(j - b)));
  return sm;
}
void step2() {
  long long val = get_Rhombus_sum(k - 1, k - 1);
  Rhombus[k - 1][k - 1] = val;
  for (int i = k - 1; i < h - k + 1; i++) {
    for (int j = k; j < w - k + 1; j++)
      Rhombus[i][j] = Rhombus[i][j - 1],
      Rhombus[i][j] -= digr[i - k + 1][j - 1] + digl[i][j - 1 - k + 1],
      Rhombus[i][j] += digl[i - k + 1][j] + digr[i][j + k - 1],
      Rhombus[i][j] += mat[i][j - 1 - k + 1],
      Rhombus[i][j] -= mat[i][j + k - 1];
    if (i + 1 < (h - k + 1))
      Rhombus[i + 1][k - 1] = Rhombus[i][k - 1],
                         Rhombus[i + 1][k - 1] -= digl[i - k + 1][k - 1] +
                                                  digr[i - k + 1][k - 1] -
                                                  mat[i - k + 1][k - 1],
                         Rhombus[i + 1][k - 1] += digl[i + 1][k - 1 - k + 1] +
                                                  digr[i + 1][k - 1 + k - 1] -
                                                  mat[i + 1 + k - 1][k - 1];
  }
}
long long get_Tri_sum(int a, int b) {
  long long sm = 0;
  for (int i = 0; i < h; i++)
    for (int j = 0; j < k; j++)
      sm += mat[i][j] * (long long)max(0, min(1, k - abs(i - a) - abs(j - b)));
  return sm;
}
long long get_Tri2_sum(int a, int b) {
  long long sm = 0;
  for (int i = 0; i < k; i++)
    for (int j = 0; j < w; j++)
      sm += mat[i][j] * (long long)max(0, min(1, k - abs(i - a) - abs(j - b)));
  return sm;
}
void step3() {
  long long val = get_Tri_sum(k - 1, k - 1);
  triangles1[k - 1][k - 1] = val;
  for (int i = k - 1; i < h - k + 1; i++) {
    for (int j = k; j < w - k + 1; j++)
      triangles1[i][j] = triangles1[i][j - 1],
      triangles1[i][j] -= digr[i - k + 1][j - 1] + digl[i][j - 1 - k + 1] -
                          mat[i][j - 1 - k + 1],
      triangles1[i][j] += H[i - k + 1][j];
    if (i + 1 < (h - k + 1))
      triangles1[i + 1][k - 1] = triangles1[i][k - 1],
                            triangles1[i + 1][k - 1] -= digr[i - k + 1][k - 1],
                            triangles1[i + 1][k - 1] +=
                            digl[i + 1][k - 1 - k + 1];
  }
  triangles2[k - 1][k - 1] = get_Tri2_sum(k - 1, k - 1);
  for (int i = k - 1; i < h - k + 1; i++) {
    for (int j = k; j < w - k + 1; j++)
      triangles2[i][j] = triangles2[i][j - 1],
      triangles2[i][j] -= digr[i - k + 1][j - 1],
      triangles2[i][j] += digl[i - k + 1][j];
    if (i + 1 < (h - k + 1))
      triangles2[i + 1][k - 1] = triangles2[i][k - 1],
                            triangles2[i + 1][k - 1] -= digr[i - k + 1][k - 1],
                            triangles2[i + 1][k - 1] -= digl[i - k + 1][k - 1],
                            triangles2[i + 1][k - 1] += mat[i - k + 1][k - 1],
                            triangles2[i + 1][k - 1] += V[i + 1][0];
  }
}
long long get_Rhombus_sum2(int a, int b) {
  long long sm = 0;
  for (int i = 0; i < h; i++)
    for (int j = 0; j < w; j++)
      sm += mat[i][j] * (long long)max(0, k - abs(i - a) - abs(j - b));
  return sm;
}
void step4() {
  long long val = get_Rhombus_sum2(k - 1, k - 1);
  result[k - 1][k - 1] = val;
  for (int i = k - 1; i < h - k + 1; i++) {
    for (int j = k; j < w - k + 1; j++)
      result[i][j] = result[i][j - 1] - triangles1[i][j - 1],
      result[i][j] += Rhombus[i][j] - triangles1[i][j] + H[i - k + 1][j];
    if (i + 1 < (h - k + 1))
      result[i + 1][k - 1] = result[i][k - 1],
                        result[i + 1][k - 1] -= triangles2[i][k - 1],
                        result[i + 1][k - 1] +=
                        Rhombus[i + 1][k - 1] - triangles2[i + 1][k - 1],
                        result[i + 1][k - 1] += V[i + 1][0];
  }
}
int main() {
  scanf("%d%d%d", &h, &w, &k);
  for (int i = 0; i < h; i++)
    for (int j = 0; j < w; j++) scanf("%d", &mat[i][j]);
  step1();
  step2();
  step3();
  step4();
  int a, b;
  long long mx = -1;
  for (int i = k - 1; i < h - k + 1; i++)
    for (int j = k - 1; j < w - k + 1; j++)
      if (result[i][j] > mx) mx = result[i][j], a = i, b = j;
  printf("%d %d", a + 1, b + 1);
}
