#include<stdio.h> int change(int num) { if (num < 0) { num =~(num - 1); } return num; } int main() { int m, n; int arr[100][100]; while (scanf("%d%d", &m, &n) != EOF) { int x = 0,y = 0; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { scanf("%d", &arr[i][j]); } } int max = arr[0][0]; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (change(max) < change(arr[i][j])) { x = i; y = j; max = arr[i][j]; } } } printf("%d %d %d\n", x+1, y+1, max); } }