#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int maxn = 2e5 + 10;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a[210][210] = {0};
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= m; ++j) scanf("%d", &a[i][j]);
  int ans = 0, pos = 0;
  for (int j = 1; j <= m; ++j) {
    int mx = 0, num = 0, cnt = 0;
    for (int i = 1; i <= n; ++i) {
      int x = 0;
      for (int z = 1; z <= k; ++z) x += a[z + i - 1][j];
      if (x > mx) mx = x, num = cnt;
      if (!a[i][j]) continue;
      cnt++;
    }
    ans += mx;
    pos += num;
  }
  cout << ans << " " << pos << endl;
  return 0;
}
