semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/**
????4.cpp
?  ?????
?  ??11.02
?  ??????
*/
  
int main()
{
    int a[5][5], cnt=0;
    int i, j, p, k, m, rowmax;
	for(i = 0;i < 5;i++)
		for(j = 0;j < 5;j++)
			cin >> a[i][j];

    for(i = 0;i < 5;i++)
    {   rowmax = a[i][0];
		for(j = 0;j < 5;j++)
		{  
			if(a[i][j] >= rowmax)
				rowmax = a[i][j];
           
		}
		
		for(j = 0;j < 5;j++)
		{
			if(a[i][j] == rowmax)
				p = j;
		}
		
	
		for(k = 0;k < 5;k++)
		{
			if(a[i][p] <= a[k][p])
			    m = i;
		    else 
			{
				m = -1;
			    break;
			}
		}

		if(m == i)
		{   
			cout << m + 1 << " " << p + 1 << " " << a[i][p] << endl;
            cnt++;
		}
		  
	}
	    
	if(cnt == 0)
		cout << "not found" << endl;

	return 0;
}
int main()
{
	int s[5][5];
	int i, j, k, n, max;
	int flag[5];
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d", &s[i][j]);
		}
	}
	for(i=0;i<5;i++){
		max=s[i][0];
		n=0;
		for(j=0;j<5;j++){
			if(s[i][j]>max) {
				max=s[i][j];
				n=j;
		}
		}
		flag[i]=1;
		for(k=0;k<5;k++){
			if(s[k][n]<s[i][n]){
				flag[i]=0;
			}
		}
		if(flag[i]==1) printf("%d %d %d\n", i+1, n+1, max);
	}
	if(flag[0]==0 && flag[1]==0 && flag[2]==0 && flag[3]==0 && flag[4]==0){
		printf("not found");
	}

		return 0;
}
void main()
{
int a[5][5],i,j,k,l=0,t=0;
int (*p)[5];
p=a;
for(i=0;i<5;i++)
for(j=0;j<5;j++)
scanf("%d",(*(p+i)+j));
for(i=0;i<5;i++)
{for(j=0;j<5;j++)
{t=0;
for(k=0;k<5;k++)
{if(*(*(p+i)+j)<*(*(p+i)+k))
t--;}
for(k=0;k<5;k++)
{if(*(*(p+i)+j)>*(*(p+k)+j))
t--;}
if(t==0)
{printf("%d %d %d",i+1,j+1,a[i][j]);
l--;}
}}
if(l==0)
printf("not found");
}
int main()
{
	int a[5][5], i, j, row[5], col[5], sum, n;
	int max[5] = {0};
	sum = 0;
	for(i = 0; i < 5; i++)
	{
		for(j = 0; j < 5; j++)
			cin >> a[i][j];
	}
	for(i = 0; i < 5; i++)
        for(j = 0; j < 5; j++)
		{
			if(a[i][j] > max[i])
			{
				max[i] = a[i][j];
				row[i] = i;
			    col[i] = j;
			}
		}
	for(n = 0; n < 5; n++)
	{
		for(i = 0; i < 5; i++)
		{
			if(a[i][col[n]] < max[n]) break;
		}
		if(i == 5)
		{
			sum++;
			cout << row[n] + 1 << " " << col[n] + 1 << " " << max[n] << endl;
		}
    }
	if(sum == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int a[5][5] ,g = 0;
	for(int i = 0; i < 5; i++)
		for(int j = 0; j < 5; j++)
			cin >> a[i][j];
	for(int m = 0; m < 5; m++)
	{	
		int max = a[m][0], p = 0;
		for(int j = 0; j < 5; j++)
		{
			if(max < a[m][j])
			{
				max = a[m][j];
				p = j;
			}
		}
		int min = a[0][p];
		for(int k = 0; k < 5; k++)
		{
			if(min > a[k][p])
				min = a[k][p];
		}
		if(max == min)
		{
			cout << m + 1 << " " << p + 1 << " " << max << endl;
			g++;
		}
	}
	if(g == 0)
		cout << "not found" << endl;
	return 0;
}
//********************************
//*????                     **
//*????? 1300012848        **
//*???2013.11.1              **
//********************************
int main()
{
	int a[5][5], g = 0;
	for (int i = 0; i < 5; i++)
		for (int j = 0; j < 5; j++)
			cin >> a[i][j];
	for (int i = 0; i < 5; i++)
		for (int j = 0; j < 5; j++)
			if (a[i][j] <= a[0][j] && a[i][j] <= a[1][j] && a[i][j] <= a[2][j] && a[i][j] <= a[3][j] && a[i][j] <= a[4][j]
			&& a[i][j] >= a[i][0] && a[i][j] >= a[i][1] && a[i][j] >= a[i][2] && a[i][j] >= a[i][3] && a[i][j] >= a[i][4])
			{	
				cout << i+1 << " " << j+1 << " " << a[i][j] << endl; //??i?j??????? ??????
				g = 1; //???????g=1
			}
	if(g == 0) //g=0?????
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int i,j,l,max[5],min[5],sz[5][5],sum=0,big[5];
	for(i=0;i<=4;i++){
		scanf("%d %d %d %d %d",&sz[i][0],&sz[i][1],&sz[i][2],&sz[i][3],&sz[i][4]);
	}
	for(i=0;i<5;i++){
		max[i]=sz[i][0];
	}
	for(j=0;j<5;j++){
		min[j]=sz[0][j];
	}
	for(i=0;i<5;i++){
		for(l=0;l<5;l++){
			if(sz[i][l]>=max[i]){
				max[i]=sz[i][l];
				big[i]=l;
			}
		}
	}
	for(j=0;j<5;j++){
		for(l=0;l<5;l++){
			if(sz[l][j]<=min[j]){
				min[j]=sz[l][j];
			}
		}
	}
	for(i=0;i<5;i++){
		if(max[i]==min[big[i]]){
			printf("%d %d %d\n",i+1,big[i]+1,max[i]);
				sum++;
		}if(i==4&&sum==0){
			printf("not found");
		}
	}
	return 0;
}
int main()
{
    int a[5][5];
    int i,j;
    int sum=0;
    int p;
    int min,max;

    for(i=0;i<5;i++)
    {
        for(j=0;j<5;j++)
        {
            scanf("%d",&a[i][j]);
        }
    }
    for(i=0;i<5;i++)
    {
        p=0;
        max=a[i][0];
        for(j=1;j<5;j++)
        {
            if(a[i][j]>max)
            {
max=a[i][j];                
p=j;
            }
        }
        //printf("*%d*%d*\n",i,p);
        min=a[0][p];
        for(j=0;j<5;j++)
        {
            if(a[j][p]<min)
            {
               min=a[j][p];
            }
        }
        if(min==a[i][p])
        {
            printf("%d %d %d",i+1,p+1,a[i][p]);
            sum++;
        }

    }
    if(sum==0)
    {
        printf("not found");
    }
 return 0;
}
main()
{
      int i,j,k=0,a[5][5];
      int b[5][5]={0},c[5][5]={0},d[5][5];
      for(i=0;i<5;i++)
      {
                      scanf("%d %d %d %d %d",&a[i][0],&a[i][1],&a[i][2],&a[i][3],&a[i][4]);
      }
      for(i=0;i<5;i++)
      {
                      for(j=0;j<5;j++)
                      {
                                      if(a[i][j]>=a[i][0]&&a[i][j]>=a[i][1]&&a[i][j]>=a[i][2]&&a[i][j]>=a[i][3]&&a[i][j]>=a[i][4])
                                      b[i][j]=1;
                      }
      }
      for(i=0;i<5;i++)
      {
                      for(j=0;j<5;j++)
                      {
                                      if(a[i][j]<=a[0][j]&&a[i][j]<=a[1][j]&&a[i][j]<=a[2][j]&&a[i][j]<=a[3][j]&&a[i][j]<=a[4][j])
                                      c[i][j]=1;
                      }
      }
      for(i=0;i<5;i++)
      {
                      for(j=0;j<5;j++)
                      {
                                      d[i][j]=b[i][j]*c[i][j];
                                      if(d[i][j]==1)
                                      printf("%d %d %d\n",i+1,j+1,a[i][j]);
                      }
      }
      for(i=0;i<5;i++)
      {
                      for(j=0;j<5;j++)
                      {
                                      d[i][j]=b[i][j]*c[i][j];
                                      if(d[i][j]==0)
                                      k=k+1;
                      }
      }
      if(k==25)
      printf("not found");
      
}
int main()
{ int a[6][6],i,j,max,k=0,mark=0;//????????????????????i?j????????max?????k?mark?
 for(i=1;i<6;i++)//??????
	 {for(j=1;j<6;j++)
	 cin>>a[i][j];}
 
 for(i=1;i<6;i++)//?????????????????????
 {max=a[i][1];
	 for(j=1;j<6;j++)
	 {if(a[i][j]>=max) 
		 {max=a[i][j];k=j;}
	 }
 
	if(a[i][k]<=a[1][k]&&a[i][k]<=a[2][k]&&a[i][k]<=a[3][k]&&a[i][k]<=a[4][k]&&a[i][k]<=a[5][k]) //???????????????????????
	
		 {mark=1;
		  cout<<i<<" "<<k<<" "<<a[i][k]<<endl;
		}
	
 }
 if(mark==0)cout<<"not found";
 return 0;
}
int main()
{
	int a[5][5],i,j,max[5],min[5],t=1;
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++)
		max[i]=a[i][0];
	for(j=0;j<5;j++)
		min[j]=a[0][j];
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			{if(a[i][j]>max[i]) max[i]=a[i][j];
			if(a[i][j]<min[j]) min[j]=a[i][j];
			}
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
		{if(a[i][j]==max[i]&&a[i][j]==min[j])
			{cout<<i+1<<" "<<j+1<<" "<<a[i][j]<<endl;
		     t--;
			}
		}
	if(t!=0) cout<<"not found"<<endl;
	return 0;
}
int max (int a,int b,int c,int d,int e)
{
    int m=0;
    if(m<a)
    m=a;
    if(m<b)
    m=b;
    if(m<c)
    m=c;
    if(m<d)
    m=d;
    if(m<e)
    m=e;
}
int min (int a,int b,int c,int d,int e)
{
    int m=100000;
    if(m>a)
    m=a;
    if(m>b)
    m=b;
    if(m>c)
    m=c;
    if(m>d)
    m=d;
    if(m>e)
    m=e;
}
main()
{
      int a[5][5],j,i,b[5],c[5],z=0;
      for(i=0;i<5;i++) 
      {
                      for(j=0;j<5;j++)
                      {
                                      scanf("%d",&a[i][j]);
                      }
      }
      for(i=0;i<5;i++)
      {
                      b[i]=max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]);
      } 
      for(i=0;i<5;i++)
      {
                      c[i]=min(a[0][i],a[1][i],a[2][i],a[3][i],a[4][i]);
      }
      for(i=0;i<5;i++)
      {
                      for(j=0;j<5;j++)
                      {
                                      if(b[i]==c[j])
                                      {z=1;printf("%d %d %d\n",i+1,j+1,b[i]);}
                      }
      } 
      if(z==0)
      printf("not found\n");
}
//****************************************
//*???????                       **
//*?????? 1100012920              **
//*???2011.10.19                     **
//****************************************
int main()
{
	int a[5][5], i, j, k, m = 0, n = 0, flag = 0;
	for(i = 0; i < 5; i++)
	{
		for(j = 0; j < 5; j++)
		{
			cin >> a[i][j];
		}
	}
	for(i = 0; i < 5; i++)
	{
		for(j = 0; j < 4; j++)
		{
			if(a[i][j+1] > a[i][m])
				m = j + 1;
		}
		for(k = 0; k < 5; k++)
		{
			if(a[k][m] < a[i][m])
			{	
				break;
			}
		    else n = 1;
		}
		if(k == 5) 
		{
			flag = 1;
			cout << i+1 << " " << m+1 << " " << a[i][m] << endl;
		}
		m = 0;
		
	}
	if(flag == 0) cout << "not found" << endl;
	return 0;
}
int main()
{
	int	a[5][5];	//????5*5???
	int	q = 0, hang, lie;	
	for (int i = 0; i < 5; i ++)
	{
		for (int j = 0; j < 5; j ++)
		{
			cin >> a[i][j];
		}
	} 
	for (int i = 0; i < 5; i ++)
	{
		int 	p = 0;
		int	k;
		for (int j = 0; j < 5; j ++)
		{
			if (p < a[i][j])
			{
				p = a[i][j];				
				lie = j;
			}
		}
		for (k = 0; k < 5; k ++)
		{
			if (p > a[k][lie])
			{
				break;
			}
		}
		if (k == 5)
		{
			hang = i + 1;
			lie ++;
			cout << hang << " " << lie << " " << p << endl;
			q = 1;
		}
	}
	if (q == 0)
	{
		cout << "not found" << endl;
	}
return 0;
}
main()
{
      int a[5][5],b[5][5];
      int i,j,k,js;
      for(i=0;i<5;i++)
          scanf("%d %d %d %d %d",&a[i][0],&a[i][1],&a[i][2],&a[i][3],&a[i][4]);
      for(i=0;i<5;i++)
          for(j=0;j<5;j++)
              b[i][j]=1;
      js=0;
      for(i=0;i<5;i++)
          for(j=0;j<5;j++)
          {
              for(k=0;k<5;k++)
              {
                  if(a[i][j]>a[k][j])
                      b[i][j]=0;
              }
              for(k=0;k<5;k++)
              {
                  if(a[i][j]<a[i][k])
                      b[i][j]=0;
              }
              if(b[i][j]==1)
              {    
                   printf("%d %d %d",i+1,j+1,a[i][j]);
                   js=1;
              }                   
          }
      if(js==0)
         printf("not found");
      getchar();
      getchar();
      getchar();
}
int main()
{
	int a[5][5];
	int max[5];
	int i, j, tell, alltell = 0;
	for(i = 0; i < 5; i++)
	{
		max[i] = 0;
		for(j = 0; j < 5; j++)
		{
			cin >> a[i][j];
            max[i] = a[i][max[i]] > a[i][j] ? max[i] : j;
		}
	}
	for(j = 0; j < 5; j++)
	{
		for(tell = 0, i = 0; i < 5; i++)
			if(a[j][max[j]] > a[i][max[j]])
				tell = 1;
		if(tell == 0)
		{
			cout << j + 1 << " " << max[j] + 1 
				<< " " << a[j][max[j]] << endl;
			alltell++;
		}
	}
	if (alltell == 0) cout << "not found" << endl;
	return 0;
}
int main ()
{
	int a[6][6] , hang1 , hang2 , lie , i , j , k , max , min , flag = 1 ;
	for ( i = 1 ; i <= 5 ; i++ )
	{
		for ( j = 1 ; j <= 5 ; j++ )
		{
			cin >> a[i][j];
		}
	}
	for ( i = 1 ; i <= 5 ; i++ )
	{
		max = a[i][1] ;
		hang1 = i ;
		lie = 1 ;
		for ( j = 1 ; j <= 5 ; j++ )
		{
			if ( a[i][j] >= max )
			{
				max = a[i][j] ;
				lie = j ;		
			}
		}
	    min = a[hang1][lie] ;
		for ( k = 1 ; k <= 5 ; k++ )
		{
			if ( a[k][lie] <= min )
			{
				min = a[k][lie] ;
				hang2 = k ;
			}
		}
	    if ( hang1 == hang2 )
		{
		    cout << hang1 << ' ' << lie << ' ' << a[hang1][lie] << endl ;
			flag = 0 ;
			break ;
		}
        else if ( hang1 != hang2 ) 
		{
		    continue ;
		}
	}
	if ( flag ) 
	{
		cout << "not found" << endl ;
	}
	return 0 ;
}
int main(){
    double a[7][7],max,c[7];
    int x=0,y=0,d=0;
    for(int i=0;i<7;i++){
            for(int j=0;j<7;j++){
                    if(i==0||i==6||j==0||j==6)
                    a[i][j]=0;
                    else
                    scanf("%lf",&a[i][j]);
                    }
            }
    for(int m=1;m<6;m++){
            c[m]=1;
            max=0;
            for(int n=1;n<6;n++){
                    if(a[m][n]>max){
                    max=a[m][n];
                    x=n;
                    y=m;
                    }
            }
            for(int t=1;t<=5;t++){
                            if(max>a[t][x])
                            c[m]=0;
                            }
            if(c[m]==1){
            d=1;
            printf("%d %d %.0lf",y,x,max);
            }
            }
    if(d==0)
    printf("not found");
    return 0;
}
int main()                                           //?????
{
	int a[10][10]={0};                               //????a????????
	int max[10]={0};                                 //????max????????
	int m[10]={0};                                   //????m???????????
	int min[10]={0};                                 //????min????????
	for(int i = 1 ; i <= 5 ; i++)                    //????
	{
		for(int j = 1 ; j <= 5 ; j++)
		{
			cin>>a[i][j];
		}
	}
    
	for(int i = 1 ; i <= 5 ; i++)                    //?????????????????max????????????
	{
		max[i]=a[i][1];
		for(int j = 1 ; j <= 5 ; j++)
		{
			if(max[i]<=a[i][j])
			{
				max[i]=a[i][j];
				m[i]=j;
			}
		}
	}

    for(int j = 1 ; j <= 5 ; j++)                    //?????????????????min
	{  
		min[j]=a[1][j];
		for(int i = 2 ; i <= 5 ; i++)
		{
			if(min[j]>a[i][j])
			{
				min[j]=a[i][j];
			}
		}
	}
    int count=0;                                     //????count????
	for(int i = 1 ; i <= 5 ; i++)                    //???????? ??????????????
	{
		if(max[i]==min[m[i]])
		{
			cout<<i<<" "<<m[i]<<" "<<max[i]<<endl;
		}
		else
			count++;		
	}
	if(count==5)                                     //????5????not found
		cout<<"not found"<<endl;
	return 0;                                        //???????????????????
}
int main(){
    int aa[6][6],bb[6],c,dd[6],i,j;
     for(i=1;i<=5;i++){
       bb[i]=0;
       dd[i]=0;
      for(j=1;j<=5;j++){
       cin>>aa[i][j];
       }
       }
for(i=1;i<=5;i++){
     bb[i]=aa[i][1]; 
  for(j=2;j<=5;j++){
     if(aa[i][j]>=bb[i])
       bb[i]=aa[i][j];
       }
       }
for(i=1;i<=5;i++){
     dd[i]=aa[1][i]; 
  for(j=2;j<=5;j++){
     if(aa[j][i]<=dd[i])
       dd[i]=aa[j][i];
       }
       }   
       c=0;   
for(i=1;i<=5;i++){
  for(j=1;j<=5;j++){
    if(bb[i]==dd[j]){
    cout<<i<<" "<<j<<" "<<bb[i];
        c=1;
}
}
}
     if(c==0)
     cout<<"not found";
    return 0;
}
int max(int a,int b,int c,int d,int e);
int min(int a,int b,int c,int d,int e);

int main() 
{ 
	int sz[5][5];
	int row=0;
	int col=0;
	int refer=0;
	for(row=0;row<5;row++)
	{
		for(col=0;col<5;col++)
		{
			scanf("%d",&sz[row][col]);
		}
	}
	for(row=0;row<5;row++)
	{
		for(col=0;col<5;col++)
		{
			if(sz[row][col]==max(sz[row][0],sz[row][1],sz[row][2],sz[row][3],sz[row][4]) && sz[row][col]==min(sz[0][col],sz[1][col],sz[2][col],sz[3][col],sz[4][col]))
			{
				refer=1;
				printf("%d %d %d\n",row+1,col+1,sz[row][col]);
			}
		}
	}
	if(refer==0)
	{
		printf("not found");
	}
	return 0;
} 

int max(int a,int b,int c,int d,int e)
{
	int x=a;
	if(b>x)
	{
		x=b;
	}
	if(c>x)
	{
		x=c;
	}
	if(d>x)
	{
		x=d;
	}
	if(e>x)
	{
		x=e;
	}
	return x;
}

int min(int a,int b,int c,int d,int e)
{
	int x=a;
	if(b<x)
	{
		x=b;
	}
	if(c<x)
	{
		x=c;
	}
	if(d<x)
	{
		x=d;
	}
	if(e<x)
	{
		x=e;
	}
	return x;
}
/*
 * 1000012809-38.cpp
 *
 *  Created on: 2010-11-17
 *      Author: dell
 */
int main(){
	int i,s=0,j,a[5][5];
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			cin>>a[i][j];
		}
	}
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(((((a[i][j]-a[i][0])>0)+((a[i][j]-a[i][1])>0)+
					((a[i][j]-a[i][2])>0)+((a[i][j]-a[i][3])>0)+
					((a[i][j]-a[i][4])>0))==4)&&(((a[i][j]-a[0][j])<0)+((a[i][j]-a[1][j])<0)+
					((a[i][j]-a[2][j])<0)+((a[i][j]-a[3][j])<0)+((a[i][j]-a[4][j])<0)==4))  {
				cout<<i+1<<" "<<j+1<<" "<<a[i][j];
				s=1;
			}
		}
	}
	if(s==0)
		cout<<"not found";
	return 0;
}
int main(){
    int g,n,m,k,x,h,i,j;
    int a[5][5],b[5],c[5],d[5],e[5];
    for(i=0;i<5;i++){
        for(j=0;j<5;j++){
           scanf("%d",&a[i][j]);
           }
        }     
    for(i=0;i<5;i++){
    g=0;
        for(j=0;j<5;j++){
           if(a[i][j]>g){
              g=a[i][j];
              
              b[i]=i;
              c[i]=j;
              }
              }
              }
    for(j=0;j<5;j++){
    h=1000000;
        for(i=0;i<5;i++){
           if(a[i][j]<h){
              h=a[i][j];
              d[j]=i;
              e[j]=j;
              }
              }
              }
    x=0;
    for(j=0;j<5;j++){
        for(i=0;i<5;i++){
           if(b[i]==d[j]&&c[i]==e[j]){
           m=b[i];
           n=c[i];
           printf("%d %d %d",m+1,n+1,a[m][n]);
           x=1;
           }
           }
        }
        if(x==0){
           printf("not found");
           }    
    return 0;
}
int main()
{
	int a[5][5],i,j,max[5],min[5],k=0;
	for(i=0;i<5;i++)
	for(j=0;j<5;j++)
	{
		cin>>a[i][j];
	}
	for(i=0;i<5;i++)
		max[i]=a[i][0];
	for(j=0;j<5;j++)
		min[j]=a[0][j];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(a[i][j]>max[i])
				max[i]=a[i][j];
			if(a[i][j]<min[j])
				min[j]=a[i][j];
		}
	}
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
		{
			if(max[i]==min[j])
			{
				cout<<i+1<<' '<<j+1<<' '<<max[i];
				k++;
			}
		}
	if(k==0)
		cout<<"not found";
	return 0;
}
//********************************
//*???????               **
//*?????? 1300012965      **
//*???2013.11.1              **
//********************************
int main ()
{
	int a[6][6] = {{0}}, max[6] = {0}, min[6] = {1000000,1000000,1000000,1000000,1000000,1000000};
	int n, m, count = 0;
	for(int i = 1; i <= 5; i++)
		for(int j = 1; j <= 5; j++)
			cin >> a[i][j];
	for(int i = 1; i <= 5; i++)
		for(int j = 1; j <= 5; j++)
			{if(a[i][j] > max[i])
			max[i] = a[i][j];}
	for(int j = 1; j <= 5; j++)
		for(int i = 1; i <= 5; i++)
			{if(a[i][j] < min[j])
			min[j] = a[i][j];}
	for(int i = 1; i <= 5; i++)
		for(int j = 1; j <= 5; j++)
			if(max[i] == min[j])
			{
				cout << i << " " << j << " " << max[i] << endl;
			    count = 1;
		    }
	if (count == 0)
		cout << "not found" << endl;






	
	
	
	return 0;
}
int main()
{
	int a[5][5],i,j,s,t,max=0,hang,lie,m=0;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
			scanf("%d",&a[i][j]);
	}
	for(i=0;i<5;i++)
	{
max=0;
		t=0;
		for(s=0;s<5;s++)
		{
			if(a[i][s]>=max)
			{
				max=a[i][s];hang=i;lie=s;
			}
		}
		for(j=0;j<5;j++)
		{
			if(max>a[j][lie])
				t++;
		}
		if(t==0)
		{	printf("%d %d %d",hang+1,lie+1,max);
		    m++;
		}
	}
	if(m==0)
		printf("not found");
	return 0;
}
int main()
{
	int a[5][5];
	int i, j;
	int flag=1, count=0;
	for(i=0;i<5;i++)
	{
		for (j=0;j<5;j++)
			scanf("%d", &a[i][j]);
	}
	for(i=0;i<5;i++)
	{
		if(a[i][0]<a[i][1]||a[i][0]<a[i][2]||a[i][0]<a[i][3]||a[i][0]<a[i][4])
			flag=0;
		else
		{
			if(a[i][0]>a[0][0]||a[i][0]>a[1][0]||a[i][0]>a[2][0]||a[i][0]>a[3][0]||a[i][0]>a[4][0])
				flag=0;
			else 
			{
				printf("%d 1 %d\n", i+1, a[i][0]); 
				count++;
			}
		}
	}
		for(i=0;i<5;i++)
	{
		if(a[i][1]<a[i][0]||a[i][1]<a[i][2]||a[i][1]<a[i][3]||a[i][1]<a[i][4])
			flag=0;
		else
		{
			if(a[i][1]>a[0][1]||a[i][1]>a[1][1]||a[i][1]>a[2][1]||a[i][1]>a[3][1]||a[i][1]>a[4][1])
				flag=0;
			else 
			{
				printf("%d 2 %d\n", i+1, a[i][1]); 
				count++;
			}
		}
	}
		for(i=0;i<5;i++)
	{
		if(a[i][2]<a[i][0]||a[i][2]<a[i][1]||a[i][2]<a[i][3]||a[i][2]<a[i][4])
			flag=0;
		else
		{
			if(a[i][2]>a[0][2]||a[i][2]>a[1][2]||a[i][2]>a[2][2]||a[i][2]>a[3][2]||a[i][2]>a[4][2])
				flag=0;
			else 
			{
				printf("%d 3 %d\n", i+1, a[i][2]);
				count++;
			}
		}
	}
		for(i=0;i<5;i++)
	{
		if(a[i][3]<a[i][0]||a[i][3]<a[i][1]||a[i][3]<a[i][2]||a[i][3]<a[i][4])
			flag=0;
		else
		{
			if(a[i][3]>a[0][3]||a[i][3]>a[1][3]||a[i][3]>a[2][3]||a[i][3]>a[3][3]||a[i][3]>a[4][3])
				flag=0;
			else 
			{
				printf("%d 4 %d\n", i+1, a[i][3]); 
				count++;
			}
		}
	}
		for(i=0;i<5;i++)
	{
		if(a[i][4]<a[i][0]||a[i][4]<a[i][1]||a[i][4]<a[i][3]||a[i][4]<a[i][2])
			flag=0;
		else
		{
			if(a[i][4]>a[0][4]||a[i][4]>a[1][4]||a[i][4]>a[2][4]||a[i][4]>a[3][4]||a[i][4]>a[4][4])
				flag=0;
			else 
			{
				printf("%d 5 %d\n", i+1, a[i][4]); 
				count++;
			}
		}
	}
		if (flag==0&&count==0)
			printf("not found\n");
return 0;
}
int main()
{
	int k[5][5],m[5]={0};
	int i,j;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			cin>>k[i][j];
			if(k[i][j]>k[i][m[i]])
			{
				m[i]=j;
			}
		}
	}
	int flag=0,mark=0;
	for(i=0;i<5;i++)
	{
		flag=0;
		for(j=0;j<5;j++)
		{
			if(k[i][m[i]]<=k[j][m[i]])
				;
			else
				flag=1;
		}
		if(flag==0)
		{
			mark=1;
			cout<<i+1<<' '<<m[i]+1<<' '<<k[i][m[i]]<<endl;
		}
	}
	if(mark==0)
	{
		cout<<"not found"<<endl;
	}
	return 0;
}
int main(){
	int a[5][5];
	int i,j,k,t,x,y,m=0;//i,j,k?????t????x,y?????????m???
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++){
		x=0;
		y=0;
		t=a[i][0];
		for(j=0;j<4;j++){//???????
			if(t<a[i][j+1]){
				t=a[i][j+1];
				y=j+1;
			}
		}
	 for(k=0;k<5;k++){//???????????????
			if(t>a[k][y])
				break;
		}
		if(k==5){//???????????
			x=i;
			cout<<x+1<<' '<<y+1<<' '<<t<<endl;
			m=1;
		}
	}
	if(m==0)//???????
		cout<<"not found"<<endl;
	return 0;
}
int main()
{
	int sz[5][5];
	int hang,lie,p,i,j,e,n;
	for(hang=0;hang<5;hang++)
	{
		for(lie=0;lie<5;lie++)
		{
			scanf("%d",&sz[hang][lie]);
		}
	}
	for(i=0,p=1;i<5;i++)
	{
		for(j=0,e=0;j<5;j++)
		{
			if (sz[i][j]>e)
			{
				n=j;
			e=sz[i][j];
			}

		}
		
			if(e<=sz[0][n]&&e<=sz[1][n]&&e<=sz[2][n]&&e<=sz[3][n]&&e<=sz[4][n])
			{
				printf("%d %d %d\n",i+1,n+1,e);
				p=p*0;
			}
	}
	if(p==1)
	{
		printf("not found");
	}
	return 0;


}
int main(){
	int a[5][5],result[5];
	int i,j,max,min,c,d,e,p;
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d",&a[i][j]);
		}
	}
	for(i=0;i<5;i++){
		max=a[i][0];
		c=i;
		d=0;
		for(j=1;j<5;j++){
			if(a[i][j]>max){
				max=a[i][j];
				c=i;
				d=j;
			}
		}
		min=a[0][d];
		e=0;
		for(p=1;p<5;p++){
			if(a[p][d]<min){
				min=a[p][d];
				e=p;
			}
		}
		if(e==c){
			printf("%d %d %d\n",c+1,d+1,a[c][d]);
		}
		else result[i]=0;
	}
	if((result[0]==0)&&(result[1]==0)&&(result[2]==0)&&(result[3]==0)&&(result[4]==0)){
		printf("not found");
	}
	return 0;
}
//Liloy Iris 2012.11.3
//????
int main()
{
	int i,j,A[6][6],L[6],H[6],a,b,c=0;
	for (i=0;i<6;i++)
	{
		A[i][0]=0;
		A[0][i]=0;
	}
	for (i=1;i<6;i++)
	{
		for (j=1;j<6;j++)
			cin>>A[i][j];
	}
	for (i=1;i<6;i++)
	{
		a=A[i][1];
		H[i]=1;
		L[i]=1;
		b=A[1][i];
		for (j=1;j<6;j++)
		{	
			if (a<A[i][j])
			{
				a=A[i][j];
		        H[i]=j;
			}
			if (b>A[j][i])
			{
				b=A[j][i];
				L[i]=j;
			}
		}
	}
	for (i=1;i<6;i++)
	{
		if (H[L[i]]==i)
		{
			cout<<L[i]<<" "<<i<<" "<<A[L[i]][i];
			c=1;
		}
	}
	if (c==0)
		cout<<"not found";
	return 0;
}
int main()
{
	int i,j,k,s=0,x,y,a[6][6],max=0,min=1000000;
	for(i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		scanf("%d",&a[i][j]);
	}		
	for(i=1;i<=5;i++)
	{
		for(j=1;j<=5;j++)
		{
			if(a[i][j]>max)
			{
				max=a[i][j];
				x=j;
			}
		}
		for(j=1;j<=5;j++)
		{
			if(a[j][x]<min)
			{
				min=a[j][x];
				y=j;
			}
		}
		if(min==max)
		{
			printf("%d %d %d\n",y,x,max);
			s=s+1;
		}
		max=0;min=1000000;
	}
	if(s==0)
	printf("not found");
	return 0;
}
int main()
{
	int a[5][5];
	int hang[5]={0,0,0,0,0};
	int lie[5]={0,0,0,0,0};
	int i,j,b,w=0;
	for (i=0;i<5;i++)
	{
		for (j=0;j<5;j++)
		{
			scanf ("%d",&a[i][j]);
		}
	}
	int max[5];
	int min[5];
	for (i=0;i<5;i++)
	{
		max[i]=a[i][0];
		for (j=0;j<5;j++)
		{
			if (a[i][j]>max[i])
			{
				max[i]=a[i][j];
				lie[i]=j;
			}
		}
	}
	for (j=0;j<5;j++)
	{
		min[j]=a[0][j];
		for (i=0;i<5;i++)
		{
			if (a[i][j]<min[j])
			{
				min[j]=a[i][j];
				hang[j]=i;
			}
		}
	}
	for (i=0;i<5;i++)
	{
		b=lie[i];
		if (hang[b]==i)
		{      
			printf("%d %d %d\n",i+1,b+1,max[i]);
			w++;
		}
	}
	if (w==0)
	printf ("not found");
}