public class acm2022 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
int m = in.nextInt();
int n = in.nextInt();
int pos = 0;
int max = in.nextInt();
for (int i = 1; i < n * m; i++) {
int curr = in.nextInt();
if (Math.abs((double) max) < Math.abs((double) curr)) {
max = curr;
pos = i;
}
}