#include <stdio.h>
struct ss {
int data, flag;//flag为标志量
} a[11][11];
int main() {
int m, n;
scanf("%d %d", &m, &n);
for (register int i = 0; i < m; i++) {
for (register int j = 0; j < n; j++) {
scanf("%d", &a[i][j].data);
}
}
for (register int i = 0; i < m; i++) {
a[i][0].flag = 1;//1所标记的是现有最小值
for (register int j = 1; j < n; j++) {
if (a[i][j].data < a[i][j - 1].data) {
a[i][j].flag = 1;
a[i][j-1].flag = 0;
}
}
}
for (register int i = 0; i < n; i++) {
a[0][i].flag++;//寻找两次都是最小值的情况,即两次均被标记为一
for (register int j = 1; j < m; j++) {
if (a[j-1][i].data < a[j][i].data) {
a[j][i].flag++;
a[j-1][i].flag--;
}
}
}
for (register int i = 0; i < m; i++) {
for (register int j = 0; j < n; j++) {
if (a[i][j].flag == 2) {
printf("%d %d %d\n", i, j, a[i][j].data);//符合条件输出
return 0;
}
}
}
//未找到符合条件的返回no
printf("no\n");
return 0;
}