The local Plovdiv Olympiad in Informatics (POI) was held according to the following unusual rules. There were contestants and tasks. Each task was graded using only one test case. Thus, for every contestant and every task, there were only two possibilities: either the contestant solved the task or did not solve it. There was no partial scoring for any task.
The number of points assigned to each task was determined after the contest and was equal to the number of contestants who did not solve the task. The score of each contestant was equal to the sum of points assigned to the tasks solved by that contestant.
Philip participated in the contest, but he is confused by the complicated scoring rules. Now, looking at the results, he cannot determine his place in the final standings. Help Philip by writing a program that calculates his score and his rank in the final standings.
Before the contest, contestants were assigned unique numbers from to inclusive. Let Philip's number be .
In the final standings, contestants are listed in decreasing order of their scores. In case of a tie, among those contestants, the ones who solved more tasks are ranked higher. If there is still a tie, contestants with equal results are listed in increasing order of their numbers.
The first line contains integers , , and , separated by spaces.
The next lines describe which tasks were solved by each contestant. The -th of these lines describes the tasks solved by the contestant with number . Each such line contains integers, separated by spaces. Each integer is either or . A means that the contestant with number solved the corresponding task, and a means that they did not solve it.
1 \leq N \leq 2\ 000 1 \leq T \leq 2\ 000 1 \leq P \leq N
Print a single line with two integers, separated by a space. The first integer is the number of points Philip received in the POI contest. The second integer is Philip's rank in the final standings. The rank is an integer between and inclusive, where denotes a contestant at the top of the final standings (i.e., with the highest score), and denotes the bottom (i.e., with the lowest score).
Example 1