873_C. Strange Game On Matrix
Ivan is playing a strange game.

He has a matrix a with n rows and m columns. Each element of the matrix is equal to either 0 or 1. Rows and columns are 1-indexed. Ivan can replace any number of ones in this matrix with zeroes. After that, his score in the game will be calculated as follows:

  1. Initially Ivan's score is 0; 
  2. In each column, Ivan will find the topmost 1 (that is, if the current column is j, then he will find minimum i such that ai, j = 1). If there are no 1's in the column, this column is skipped; 
  3. Ivan will look at the next min(k, n - i + 1) elements in this column (starting from the element he found) and count the number of 1's among these elements. This number will be added to his score. 



Of course, Ivan wants to maximize his score in this strange game. Also he doesn't want to change many elements, so he will replace the minimum possible number of ones with zeroes. Help him to determine the maximum possible score he can get and the minimum possible number of replacements required to achieve that score.

Input

The first line contains three integer numbers n, m and k (1 ≤ k ≤ n ≤ 100, 1 ≤ m ≤ 100).

Then n lines follow, i-th of them contains m integer numbers — the elements of i-th row of matrix a. Each number is either 0 or 1.

Output

Print two numbers: the maximum possible score Ivan can get and the minimum number of replacements required to get this score.

Examples

Input

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


Output

4 1


Input

3 2 1
1 0
0 1
0 0


Output

2 0

Note

In the first example Ivan will replace the element a1, 2.
```python
n,m,k=input().split()
n=int(n)
m=int(m)
k=int(k)
array=[]
for x in range(n):
    a=input().split()
    fin=[]
    for i in a:
        fin.append(int(i))
    array.append(fin)
cumm=[[0 for x in range(m)] for y in range(n)]
i=0
while(i<m):
    j=n-1
    while(j>=0):
        if(j==n-1):
            cumm[j][i]=array[j][i]
        elif(array[j][i]==1):
            cumm[j][i]=cumm[j+1][i]+1
        else:
            cumm[j][i]=cumm[j+1][i]
        j-=1
    i+=1
right=[-1 for x in range(m)]
maxm=[0 for x in range(m)]
i=0
while(i<m):
    j=0
    while(j<n):
        if(array[j][i]==1):
            minm=min(k,n-j)
            if(-cumm[j+minm-1][i]+cumm[j][i]+array[j+minm-1][i]>maxm[i]):
                maxm[i]=-cumm[j+minm-1][i]+cumm[j][i]+array[j+minm-1][i]
                right[i]=j
        j+=1
    i+=1
sums=0
for i in maxm:
    sums+=i

change=0
i=0
while(i<len(right)):
    if(right[i]!=-1):
        change+=(cumm[0][i]-cumm[right[i]][i])
    i+=1
print(sums,change)

```