LKOI
Lkshat Team Olympiad in Informatics (LKOI) was conducted with some unique rules. There were N teams and T problems. Each problem was evaluated using only one test, meaning a problem was either fully solved or not solved at all.
The points for each problem were determined after the competition, based on the number of teams that did not solve it. Specifically, a problem's points equaled the number of teams that failed to solve it. Each team's score was the sum of the points for the problems they solved.
The Chipmunks participated in this competition, but they found the scoring system confusing. Now, looking at the results, they can't figure out their rank in the final standings. Help the Chipmunks by writing a program to calculate their score and their position in the final standings.
Before the competition, each team was assigned a unique number from 1 to N. The Chipmunks' team number is P. In the final standings, teams are ranked in non-increasing order of their scores. If two teams have the same score, the team that solved more problems is ranked higher. If there is still a tie, teams with identical results are ranked in ascending order of their team numbers.
Write a program that, given the information about which problems were solved by which teams, calculates the Chipmunks' score and their position in the final standings.
Input
The first line contains the integers N, T, and P (1 ≤ N, T ≤ 1000, 1 ≤ P ≤ N), separated by spaces. The following N lines describe which problems were solved by each team. The k-th line corresponds to the team with number k and contains T integers, separated by spaces. Each integer indicates whether the team solved a particular problem: 1 means the problem was solved, and 0 means it was not.
Output
Your program should output a single line with two integers, separated by a space. The first integer is the number of points the Chipmunks scored in the LKOI competition. The second integer is their position in the final standings. The position is an integer from 1 to N, where 1 indicates the top position (highest score), and N indicates the bottom position (lowest score).