Logo C++ Online Judge

C++

时间限制:1 s 空间限制:128 MB
TA:
统计

Description

Legendary British rock band "Oasis" recently reunited, please select the song list for their concert. Songs need to be considered for artistry, popularity, classicism, etc. The average score of these $k$ metrics will be used as the criterion for selection. From $n$ songs, please select the 2 songs with the highest average score.

Input format

On the first line, enter two positive integers $n,k$ with the meanings described above;

Starting on the second line and going down $n$ lines, each enters $k$ positive integers for the metric scores. The $i$th line indicates the scores the $i-1$th songs.

Output format

Output two lines indicating which two songs are selected (output the sequence number). Place the song with higher score in the front; if there are multiple songs with the same score, then the earlier one in input is selected or ordered in the front.

Sample input
3 2
10 20
5 25
1 2

Sample output #2
1
2

Constraint

$2 \leq n \leq 100$, $1 \leq k \leq 10$, the scores are from 1 to 100