~/algor $ cat problems/matritsa-eng-katta-yigindili-qator
Row with the largest sum
Easy
1000 ms
128 MB
25%
An integer matrix of size $n \times m$ is given. Find the number of the row whose elements have the largest sum (numbering starts at $1$) and that sum. If there are several such rows, take the topmost one.
Input
The first line contains two positive integers $n$ and $m$. Each of the next $n$ lines contains $m$ integers.
Output
One line with two space-separated integers: the row number and its sum.
Note
$1 \le n, m \le 200$
$-1000 \le a_{i,j} \le 1000$
Examples
Input #1
3 2 1 2 5 -1 0 4
Output #1
2 4
Input #2
2 2 1 1 2 0
Output #2
1 2