eolymp
bolt
Try our new interface for solving problems
Problems

Murzyk

Murzyk

prb54

It is spring. Wonderful time! Everything would seem comes back to life and moves, blossoms, begin the new passage-way of cycle of life. And famous Murzyk is not an exception! But if he is extraordinarily active in the day-time, he similarly firmly sleeps at night. Thus an unhappy predator sees nightmares mainly.

One night dreamed him that he is a judge on the mathematical competitions of rats (yes, in our time digital technologies even rats do not remain after the verge of scientific and technical progress). Competition is held among N teams with K rats in each. It continues during К rounds, in each of them the team representative names a number. A winner is a team that has the biggest product of all their named numbers. Why do not rats name a number which is maximally possible every time? Because they are rats, and that is why they deprived of intellect unlike Murzik. But also Murzik understands that he would not be able to count up the result because he don’t have enough aptitude for mathematics. That is why he asks your help.

Input

There are two integers N and K (0 < N ≤ 20, 0 < K ≤ 100000) in the first line. Each of the next К lines contains N integers - the bids of team representatives. The rats are well-educated creatures and they know only 32-bit** **signed integers.

Output

The number of the team that wins a competition. If some teams have equall results wins the team with biggest number.

Time limit 2 seconds
Memory limit 64 MiB
Input example #1
3 3
20 10 30
15 20 20
30 30 20
Output example #1
3