#include<iostream>
using namespace std;
const int N = 110;
int arr[N][N];
int m, n;
int main(){
cin >> m >> n;
for(int i = 0; i <m; i ++ ){
for(int j = 0; j < n; j ++ ){
cin >> arr[i][j];
}
}
int p = 0;
for(int i = 0; i < m; i ++ ){
int t = arr[i][0];
int temp = 0;
for(int j = 0; j < n; j ++ ){
if(arr[i][j] < t){
t = arr[i][j];
temp = j;
}
}//得到一行的最大值 t,以及所在列数 temp
int c = 0;
for(int k = 0; k < m; k ++ ){
if(arr[k][temp] > t){
c = 1;
break;
}//检验在同一列中是否存在大于t
}
if(c == 0){//不存在
cout << i << " " << temp <<" " << t << endl;
p ++;
}
}
if(p == 0){
cout << "no" << endl;
}
return 0;
}