semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
/*
 * 1e.cpp
 * function:?????? (5*5)???????????????????????
 ?????????????????????????????????not found?
 * Created on: 2012-11-10
 * Author: sear
 */
int main() {
	int a[6][6], i, j, max[6], min[6], m = 0;/*a[6][6]?????,i?????,
	 j?????,max[6]???????????,min[6]???????????,m?????*/
	for (i = 1; i < 6; i++)
		for (j = 1; j < 6; j++) {
			cin >> a[i][j];//???????????
		}
	for (i = 1; i < 6; i++) {
		max[i] = 1;
		for (j = 2; j < 6; j++) {//????????????
			if (a[i][max[i]] < a[i][j])
				max[i] = j;//????????????
		}
	}
	for (j = 1; j < 6; j++) {
		min[j] = 1;
		for (i = 2; i < 5; i++) {//????????????
			if (a[min[j]][j] > a[i][j])
				min[j] = i;//????????????
		}
	}
	for (i = 1; i < 6; i++)
		for (j = 1; j < 6; j++) {
			if ((min[j] == i) && (max[i] == j)) {
				//???????????????????????
				cout << i << " " << j << " " << a[i][j];
				//????????????
				m = m + 1;//m?1????????
			}
		}
	if (m == 0)
		cout << "not found";//??m=0?????????"not found"
	return 0;//????
}
int main(){
    int n=0,i,j,x,y;
    int sz[5][5];
    int z[5];
    for(i=0;i<5;i++){
        for(j=0;j<5;j++){
            scanf("%d",&sz[i][j]);
        }
    }
    int m=0;
    for(j=0;j<5;j++){
        for(i=0;i<5;i++){
            if(sz[j][i]>sz[j][m]){
               m=i;
            }
        }
        z[j]=m;
    }
    for(i=0;i<5;i++){
        for(j=0;j<5;j++){
            if(sz[i][z[i]]>sz[j][z[i]])
               break;
        }
        if(j==5){
           n=n+1;
           x=i+1;
           y=z[i]+1;
           printf("%d %d %d",x,y,sz[i][z[i]]);
          
        }
    }
    if(n==0)
        printf("not found");
    
    return 0;
}
int main()
{
  int i,j,x,r,row,colum,k,p=0,a[5][5];
  for (i=0;i<=4;i++)
  {
	  for(j=0;j<=4;j++)
	  {
		  cin>>x;
	      a[i][j]=x;
	  }
  }
 // cout<<"1";
  for (i=0;i<=4;i++)
  {
		r = a[i][0];
		row = i;
		colum = 0;
	  for (j=0;j<=4;j++)
      {
		  if (a[i][j]>r)
		  {
			  r=a[i][j];
			  row=i;
			  colum=j;
			  
		  }
	  }
	  //cout<<"r:"<<r<<endl;
		  k=a[0][colum];
       for (int z=0;z<=4;z++)
		 {
		   if(a[z][colum]<k)
		   k=a[z][colum];
		 }
		// cout<<"k:"<<k<<endl;
	 if(k==r)
		   { 
		 cout<<row+1<<" "<<colum+1<<" "<<k;
		   p=1;
		   }
	 
  }
  if (p==0)
  {  cout<<"not found"; }
  cin>>i;
 return 0;
}
int main()
{
	int a[5][5], i, j, max, row, line, flag = 0;
	for (i = 0; i < 5; i ++)
	{
		for (j = 0; j < 5; j ++)
		{
			cin>>a[i][j];
		}
	}
	for (i = 0; i < 5; i ++)
	{
		max = a[i][0];
		row = i; 
		line = 0;
		for (j = 0; j < 5; j ++)
		{

			
			if (a[i][j] > max)
			{
				max = a[i][j];
				row = i;
				line = j;
			}
		}
		int k;
		for (k = 0; k < 5; k ++)
		{
			if (a[k][line] >= max)
				continue;
			else
				break;
		}
		if (k == 5)
		{
			flag = 1;
			cout<<row + 1<<" "<<line + 1<<" "<<max<<endl;
		}
	}
	if (flag == 0)
		cout<<"not found"<<endl;
	return 0;
}
int main()
{
int i,j,i0,j0,k,l=0,max,flag;
int a[6][6];
for(i=1;i<=5;i++)
  for(j=1;j<=5;j++)
    cin>>a[i][j];
    

for(i=1;i<=5;i++)
   {max=0;
   for(j=1;j<=5;j++)
      {
       flag=0;
       if(a[i][j]>max)
         {max=a[i][j];
         i0=i;j0=j;}                                                             //???????????????? 
       if(j==5)
	     {for(k=1;k<=5;k++)                                                       //???????????????? 
		     if(a[k][j0]<max)
		        {flag=1;                                                         
		        break;                                                             //?????????????? 
				}
		  
         if(flag==0)
		   {cout<<i0<<" "<<j0<<" "<<a[i0][j0]<<endl;
		   l=8;
		   break;                                                                  //????????????????????? 
		   } 
		   }
     }
	 if(flag==0)
	    break;
	 }
     
if(l==0)
   cout<<"not found"<<endl;                                                           //??????????not found 
return 0;
}
int main()
{
    int num[6][6],max_hang[6],min_lie[6];
    memset(max_hang,0,sizeof(max_hang));
    memset(min_lie,1,sizeof(min_lie));
    int i,j;
    for(i=1;i<=5;i++)
    for(j=1;j<=5;j++)
    cin>>num[i][j];
    for(i=1;i<=5;i++)
    for(j=1;j<=5;j++)
    {
        if(num[i][j]>max_hang[i])max_hang[i]=num[i][j];
        if(num[i][j]<min_lie[j])min_lie[j]=num[i][j];
    }
    for(i=1;i<=5;i++)
    for(j=1;j<=5;j++)
    {
        if(num[i][j]==max_hang[i]&&num[i][j]==min_lie[j])
        {
            cout<<i<<' '<<j<<' '<<num[i][j]<<endl;
            return 0;
        }
    }
    cout<<"not found";
}
main()
{
    int i,j,n,k,m,count,q=0;
    int a[5][5];
    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,m=0,n=*(*(p+i)+j);j<5;j++)
        {
            if(n<*(*(p+i)+j))
            {
                n=*(*(p+i)+j);
                m=j;
            }
        }
        for(k=0,count=0;k<5;k++)
        {
            if(n>*(*(p+k)+m))
            {
                count++;
                break;
            }
        }
        if(count==0)
        {
            printf("%d %d %d\n",i+1,m+1,n);
            q++;
        }
    }
    if(q==0)
        printf("not found\n");
    
}
int main()
{
	int i,j,a[5][5],max[5],b[5],c[5],k,p;
	p=0;
	for(i=0;i<=4;i++)
	{
		c[i]=0;
		b[i]=0;
		for(j=0;j<=4;j++)
		{
			cin>>a[i][j];
		}
	}
	for(i=0;i<=4;i++)
	{
		max[i]=a[i][0];
		for(j=1;j<=4;j++)
		{
			if(a[i][j]>max[i])
			{
				max[i]=a[i][j];
				b[i]=j;
			}
		}
		for(k=0;k<=4;k++)
		{
			if(a[i][b[i]]<=a[k][b[i]])
			{
				c[i]=c[i]+1;
			}
		}
		if(c[i]==5)
		{
			cout<<i+1<<' '<<b[i]+1<<' '<<max[i]<<'\n';
		}
		else
		{
			p=p+1;
		}
	}
	if(p==5)
	{
		cout<<"not found"<<endl;
	}
	return 0;
}
int main()
{
	int a[6][6],i,j,k,n,m,x[6],y[6],gg,mm,o=0;
	for (i=1;i<=5;i++)
	{
		for (j=1;j<=5;j++) cin >>a[i][j];
	}
	m=-88888888;
	n=888888888;
	for (i=1;i<=5;i++)
	{
		for (j=1;j<=5;j++) 
		{
			if (a[i][j]>m) 
			{
				m=a[i][j];
				gg=j;
			}
		}
		x[i]=gg;
		m=-8888888;
	
	}
		for (j=1;j<=5;j++)
	{
		for (i=1;i<=5;i++) 
		{
			if (a[i][j]<n) 
			{
				n=a[i][j];
				mm=i;
			}
		}
		y[j]=mm;
		n=8888888;
	}

	for (i=1;i<=5;i++)
	{
		for (j=1;j<=5;j++)
		{
			if (y[x[i]]==i&&x[y[j]]==j)
			{
				cout<<i<<" "<<j<<" "<<a[i][j]<<endl;
				o++;
			}
		}
	}
	if (o==0) cout <<"not found";
	return 0;
}
main()
{
      int a[5][5],b[5]={0};
      int i,j,k,x,m,y=0;
      for (i=0;i<=4;i++)
      {
          for (j=0;j<=4;j++)
          {
              scanf ("%d",&a[i][j]);
          }
      }
      for (i=0;i<=4;i++)
      {
          x=a[i][0],m=0;
          for (j=0;j<=4;j++)
          {
              if (x<a[i][j])
              { x=a[i][j]; m=j;}
          }
          for (k=0;k<=4;k++)
          {
              if (a[i][m]>a[k][m])
              break;
              else b[i]=b[i]+1;
          }
          if (b[i]==5)
          { y=y+1; printf ("%d %d %d\n",i+1,m+1,a[i][m]); }
      }
      if (y==0) printf ("not found\n");
}
int main()
{
    int a[5][5];
    int i,j;
    int m,n,t;
    int a1,a2=0;
    for(i=0;i<5;i++)
    {
        for(j=0;j<5;j++)
        {
            cin>>a[i][j];
        }
    }
    for(m=0;m<5;m++)
    {
        for(n=0;n<5;n++)
        {
            for(t=0;t<5;t++)
            {
                if(a[m][n]<a[m][t])
                break;
            }
            if(t!=5)
            continue;
            if((t==5)&&(a[m][n]<=a[0][n])&&(a[m][n]<=a[1][n])&&(a[m][n]<=a[2][n])&&(a[m][n]<=a[3][n])&&(a[m][n]<=a[4][n]))
            {
                cout<<m+1<<" "<<n+1<<" "<<a[m][n]<<endl;
                a2=1;
            }
        }
    }
    if(a2==0)
    cout<<"not found"<<endl;
    return 0;
}
/*
* ????1000012865_1
* ??????
* ???2010-11-5
* ???????
*/
int main()
{
	const int line = 6, list = 6;
	int n[line][list];
	int i,j,m,max,maxline,maxlist,k = 0,t[6] = {0};
	for(i = 1; i <= 5; i++)
		for(j = 1; j <= 5; j++)
			cin >> n[i][j];
	for(i = 1; i <= 5; i++)
	{
		max = n[i][1];
		maxline = i;
		maxlist = 1;
		for(j = 1; j <= 5; j++)
		{
			k = 0;
			if(n[i][j] > max)
			{
				max = n[i][j];
				maxline = i;
				maxlist = j;
			}
			if(j == 5)
			{for(m = 1; m <= 5; m++)
				{
					if(m != maxline && n[m][maxlist] < max)
					{
						k = 1;
						break;
					}
				}
				if(k == 0)
				{
					cout << maxline << ' ' <<  maxlist << ' ' << n[maxline][maxlist] << endl;
					t[maxline] = 1;
				}
			}
		}
	}
	if(t[1] + t[2] + t[3] + t[4] + t[5] == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
	int a[5][5], i, j, k, flag = 0;
	int lineMax = 0, columnMin = 0, ione = 0, jone = 0 , itwo = 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 (j == 0)
			{
				lineMax = a[i][0];
				ione = i;
			}
			else
				if (lineMax < a[i][j])
				{
					lineMax = a[i][j];
					jone = j;
					ione = i;
				}
		}

		for (k = 0; k < 5; k++)
		{
			if (k == 0)
				columnMin = a[0][jone];
			else
				if (columnMin > a[k][jone])
				{
					columnMin = a[k][jone];
					itwo = k;
				}
		}
		if (itwo == ione)
		{
			cout << itwo + 1 << " " << jone + 1 << " " << a[itwo][jone] << endl;
		    flag = 1;
		}
		lineMax = 0; columnMin = 0; ione = 0; jone = 0; itwo = 0;
	}
	if (flag == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
    int t,i,a[5][5],s[5][3],l[5][3],c,r,w;
	for(t=0;t<5;t++){
		for(i=0;i<5;i++){
			scanf("%d",&a[t][i]);
		}
	}
	for(c=0;c<5;c++){
      r=a[c][0];
	  for(t=0;t<5;t++){
		  if(a[c][t]>=r){
			  r=a[c][t];
			  l[c][0]=r;
			  l[c][1]=c;
			  l[c][2]=t;
			 
		  }
	  }
	}
	for(c=0;c<5;c++){
      r=a[0][c];
	  for(t=0;t<5;t++){
		  if(a[t][c]<=r){
			  r=a[t][c];
			  s[c][0]=r;
			  s[c][1]=t;
			  s[c][2]=c; 
		  }
	  }
	}
	w=0;
	for(t=0;t<5;t++){
		for(i=0;i<5;i++){
			if(l[t][0]==s[i][0]){
				w++;
				printf("%d %d %d\n",s[i][1]+1,s[i][2]+1,s[i][0]);
			}
		}
	}
	if(w==0){
		printf("not found");
	}
	return 0;
}
int main()
{
	int a[6][6],b[6][6],c[6][6],
		i,j,//i?j??????
		k,
		t,
		p=0;
	for(i=1;i<=5;i++)
		for(j=1;j<=5;j++)
		{cin>>a[i][j];b[i][j]=a[i][j];c[i][j]=a[i][j];}//???????????????????????b,c

	for(i=1;i<=5;i++)
		for(j=1;j<=5-1;j++)
			for(k=1;k<=5-j;k++)
				if(a[i][k]>a[i][k+1])
				{t=a[i][k];a[i][k]=a[i][k+1];a[i][k+1]=t;}//??????
				
	for(j=1;j<=5;j++)
		for(i=1;i<=5-1;i++)
			for(k=1;k<=5-i;k++)
				if(b[k][j]<b[k+1][j])
				{t=b[k][j];b[k][j]=b[k+1][j];b[k+1][j]=t;}//??????

    for(i=1;i<=5;i++)
		for(j=1;j<=5;j++)
		{if(a[i][5]==b[5][j])//????????????
		  {cout<<i<<" ";
	        for(k=1;k<=5;k++)
			{if(c[i][k]==a[i][5])
			   cout<<k<<" "<<a[i][5];}//???????????????????
			p=1;//??p?
	      }
		}

    if(p==0)
		cout<<"not found";//??p?????????not found
   
		  
	
	return 0;
}
int main()
{
	int sum,n,m,i,j;
	int a[5][5];
	sum=0;
	int b[5],c[5];
	for(m=0;m<5;m++)
	{
		for(n=0;n<5;n++)
		{
			scanf("%d",&a[m][n]);
		}
	}
	for(i=0;i<5;i++)
	{
		b[i]=a[i][0];
		for(j=0;j<5;j++)
		{
			if(b[i]<a[i][j])
			{
				b[i]=a[i][j];
			}
		}
	}
	for(i=0;i<5;i++)
	{
		c[i]=a[0][i];
		for(j=0;j<5;j++)
		{
			if(c[i]>a[j][i])
			{
				c[i]=a[j][i];
			}
		}
	}
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(a[i][j]==b[i]&&a[i][j]==c[j])
			{
				printf("%d %d %d\n",i+1,j+1,a[i][j]);
				sum=sum+1;
			}
		}
	}
	if(sum==0)
	{
		printf("not found");
	}
	return 0;
}
main()
{
      int a[5][5];
      int i,j,k,max,max2,lie,hang,m=0;
      for(i=0;i<5;i++)
      for(j=0;j<5;j++)
      scanf("%d",&a[i][j]);
      for(j=0;j<5;j++)
      {
                      max=a[j][0];
                      lie=0;
      for(i=0;i<4;i++)
      if(max<a[j][i+1])
      {
                           max=a[j][i+1];
                           lie=i+1;
      } 
//printf("%d\n",max);
      max2=a[0][lie];
      hang=0;
      for(k=0;k<4;k++)
      if(max2>a[k+1][lie])
      {
                               max2=a[k+1][lie];
                               hang=k+1;
      }
//printf("%d\n",max2);
      if(max==max2)
      {
      printf("%d %d %d\n",hang+1,lie+1,max);
      m++;
      }
      }
      if(m==0)
      printf("not found\n");
}
int main()
{
	int a[5][5],b[5][5],i,j,m,n,e=0;
	memset(b,0,sizeof(b));
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			cin>>a[i][j];
	for(i=0;i<5;i++)
	{
		m=0;
		for(j=0;j<5;j++)
			if(m<a[i][j])
				m=a[i][j];
		for(j=0;j<5;j++)
			if(a[i][j]==m)
				b[i][j]=1;
	}
	for(j=0;j<5;j++)
	{
		m=1073741824;
		for(i=0;i<5;i++)
			if(m>a[i][j])
				m=a[i][j];
		for(i=0;i<5;i++)
			if(a[i][j]==m)
				b[i][j]*=-1;
	}
	for(i=0;i<5;i++)
		for(j=0;j<5;j++)
			if(b[i][j]==-1)
			{
				cout<<i+1<<" "<<j+1<<" "<<a[i][j]<<endl;
				e=1;
			}
	if(e==0)
		cout<<"not found"<<endl;
	return 0;
}
//********************************
//*???????   **
//*?????? 1200012837 **
//*???2012.11.5  **
//********************************

int main()
{
	int a[5][5], max[5] = {0}, min[5] = {0};//?????????????????????????
	int i, j, flag = 0;
	for(i = 0; i <= 4; i++)
	for(j = 0; j <= 4; j++)
	{
		cin >> a[i][j];
		if(a[i][j] > max[i])//????????
			max[i] = a[i][j];
	}
	
	for(j = 0; j <= 4; j++)
	{
		min[j] = a[1][j];
		for(i = 0; i <= 4; i++)
		{
			if(a[i][j] < min[j])//????
				min[j] = a[i][j];
		}
	}
	for(int k = 0; k <= 4; k++)//???????
	for(int l = 0; l <= 4; l++)
	{
		if(max[k] == min[l])
		{
			cout << k+1 << " " << l+1 << " " << max[k] << endl;
			flag = 1;//??????
		}

	}
	if(flag == 0)
		cout << "not found" << endl;

	return 0;
}
int main() {
	int a[5][5] = { 0 }, i, j, max1[5], least1[5], t = 0;

	int max_value(int x, int max);
	int least_value(int x, int least);

	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, max1[i] = a[i][0], least1[i] = a[0][i]; j < 5; j++) {
			max1[i] = max_value(a[i][j], max1[i]);
			least1[i] = least_value(a[j][i], least1[i]);
		}
	}
	for (i = 0; i < 5; i++)
		for (j = 0; j < 5; j++)
			if (max1[i] == a[i][j] && least1[j] == a[i][j]) {
				cout << i + 1 << " " << j + 1 << " " << a[i][j] << endl;
				t = t + 1;
			}

	if (t == 0)
		cout << "not found" << endl;

	return 0;
}

int max_value(int x, int max) {
	if (x > max)
		return x;
	else
		return max;
}
int least_value(int x, int least) {
	if (x > least)
		return least;
	else
		return x;
}
//****************************************************************
// ????1000012789_3.cpp                                      *
// ???wusy                                                    *
// ???11,3                                                    *
// ???????                                                *
//****************************************************************
int main()
{
	int a[5][5],  maxr[5], e[5], f[5], max, g, count = 0;//??????????
	for(int i = 0; i < 5; i++)
		for(int j = 0; j < 5; j++)
			cin >> a[i][j];

	for(int k = 0; k < 5; k++)
	{
		max = a[k][0];									//?????	
		f[k] = 0;								      		
		for(int t = 0; t < 5; t++)
		{
			if(a[k][t] > max)
			{
				max = a[k][t];							//	???????????????
				f[k] = t;
			}
		}
		maxr[k] = max;									//	??????????????
		e[k] = k;										//	?????
	}

	for(int p = 0; p < 5; p++)
	{
		g = 0;											//	???????g
		for(int q = 0; q < 5; q++)
		{
			if(maxr[p] > a[q][f[p]])
			{
				g = 1;
				break;									//	????????????????????????g?1
			}
		}
		if(g == 0)										//	?g????????????
		{
			cout << e[p] + 1 << " " << f[p] + 1 << " " << maxr[p] << endl;
			count++;
		}
	}

	if(count == 0)
		cout << "not found" << endl;
	return 0;
}
int main()
{
int a[5][5];
int i,j,max,min,col1,andian,k;
for(i=0;i<5;i++)
for(j=0;j<5;j++)
cin>>a[i][j];

for(i=0;i<5;i++)
{max=a[i][0];col1=0;
for(j=0;j<5;j++)
	if(a[i][j]>max)
		{max=a[i][j];

col1=j;}
andian=1;
for(k=0;k<5;k++)
if(max>a[k][col1])
	{andian=0;
continue;
}
if(andian==1)
{cout<<i+1<<" "<<col1+1<<" "<<max<<endl;
break;}
}
if(andian!=1)
cout<<"not found"<<endl;
return 0;
}
int main()
{
	int a[6][6],i,j,b[6],c[6];
	for(i=1;i<=5;i++)
		for(j=1;j<=5;j++)
			cin>>a[i][j];
	for(i=1;i<=5;i++)
	{
		b[i]=1;
		for(j=1;j<=5;j++)
			if (a[i][j]>a[i][b[i]]) b[i]=j;
	}
	for(j=1;j<=5;j++)
	{
		c[j]=1;
		for(i=1;i<=5;i++)
			if (a[i][j]<a[c[j]][j]) c[j]=i;
	}
	j=0;
	for(i=1;i<=5;i++)
		if (i==c[b[i]]) 
		{
			j=1;
			cout<<i<<' '<<b[i]<<' '<<a[i][b[i]]<<endl;
		}
	if(j==0) cout<<"not found";
	return 0;
}
main()
{
	int matrix[5][5];
	for (int i=0;i<=4;i++)
		for (int m=0;m<=4;m++)
			scanf ("%d",&matrix[i][m]);
	int c=0;
	for (int n=0;n<=4;n++)
		for (int l=0;l<=4;l++)
			{
				int max=matrix[n][l];
				for (int a=0;a<=4;a++)
					{
						if (matrix[n][a]>max)
						max=matrix[n][a];
						else
						max=max;
					}
				int min=matrix[n][l];
				for (int b=0;b <=4;b++)
					{
						if (matrix[b][l]<min)
						min=matrix[b][l];
						else
						min=min;
					}
				if (max==matrix[n][l]&&min==matrix[n][l])
				{
				printf("%d %d %d",n+1,l+1,max);
				c++;
			    }
			} 
	if (c==0)
	printf ("not found");
		
}
int main()
{
	int num[5][5],counter=0;
	for(int i=0;i<5;i++)
	{
		for(int j=0;j<5;j++)
		{cin>>num[i][j];}
		cout<<endl;
	}
	for(int i=0;i<5;i++)
	{
		for(int j=0;j<5;j++)
		{
			int mid=0,second=0;
			for(int k=0;k<5;k++)
			{
			   mid+=(num[i][j]>num[i][k]);
			}
			if(mid==4)
			{ 
			   for(int l=0;l<5;l++)
			{
					second+=(num[i][j]<num[l][j]);
			}
			if(second==4)
			{cout<<i+1<<" "<<j+1<<" "<<num[i][j]<<endl; 
			counter++;}
			}
		}
	}
	if(counter==0)
		cout<<"not found";
	return 0;
}
/*
 * ????.cpp
 *
 *  Created on: 2012-11-5
 *      Author: ??
 */
int main() {
	int a[5][5], s = 0;//s???????
	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++)//?????
			for (int k = 0; k < 5; k++) {
				if (a[i][j] < a[i][k])
					break;
				if (k == 4)//??????????????
					for (int l = 0; l < 5; l++) {
						if (a[i][j] > a[l][j])
							break;
						if (l == 4) {//?????????????s??
							cout << i + 1 << ' ' << j + 1 << ' ' << a[i][j];
							s++;
						}
					}
			}
	if (s == 0)
		cout << "not found";//???
	return 0;
}
int main()
{
    int a[5][5];
    int i,j,p;
    int b,c,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++)
    {
                    for(j=0;j<5;j++)
                    {
                                    b=1;
                                    c=1;
                                    for(p=0;p<j;p++)
                                    {
                                                    if(a[i][j]<a[i][p])
                                                    {
                                                                       b=0;
                                                    }
                                    }
                                    for(p=j+1;p<5;p++)
                                    {
                                                      if(a[i][j]<a[i][p])
                                                      {
                                                                         b=0;
                                                      }
                                    }
                                    for(p=0;p<i;p++)
                                    {
                                                    if(a[i][j]>a[p][j])
                                                    c=0;
                                    }
                                    for(p=i+1;p<5;p++)
                                    {
                                                      if(a[i][j]>a[p][j])
                                                      c=0;
                                    }
                                    if(b==1&&c==1)
                                    {
                                                  m=1;
                                         printf("%d %d %d\n",i+1,j+1,a[i][j]);
                                    }
                    }
    }
    if(m==0)
    printf("not found");
    return 0;
}
int main()
{
	int x[5][5],m[5],h[5],l[5],n=0,an[5],hh[5],ll[5],k=0;
	int i,j;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&x[i][j]);
		}
	}
	m[0]=x[0][0];
	m[1]=x[1][0];
	m[2]=x[2][0];
	m[3]=x[3][0];
	m[4]=x[4][0];
	h[0]=1;
	h[1]=2;
	h[2]=3;
	h[3]=4;
	h[4]=5;
	l[0]=1;
	l[1]=2;
	l[2]=3;
	l[3]=4;
	l[4]=5;
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			if(m[i]<=x[i][j])
			{
				m[i]=x[i][j];
				l[i]=j;
			}
		}
	}
	for(i=0;i<5;i++)
	{
		if(m[i]<=x[0][l[i]]&&m[i]<=x[1][l[i]]&&m[i]<=x[2][l[i]]&&m[i]<=x[3][l[i]]&&m[i]<=x[4][l[i]])
		{
			n+=1;
			an[k]=m[i];
			hh[k]=h[i];
			ll[k]=l[i]+1;
			k+=1;
		}
	}
	if(n==0)
	{
		printf("not found");
	}
	else
	{
		for(i=0;i<n;i++)
		{
			printf("%d %d %d",hh[i],ll[i],an[i]);
		}
	}
	return 0;
}
int main()
{
    int a[5][5],max[5]={-110,-110,-110,-110,-110},min[5]={100000,1100000,1100000,1100000,1100000},sum=0,p[5],q[5],x[5],y[5];
    int i=0,j=0;
            for(i=0;i<=4;i++)
       for(j=0;j<=4;j++)
  cin>>a[i][j];
         
       
     for(i=0;i<=4;i++)
       for(j=0;j<=4;j++)
         if(a[i][j]>max[i])
            max[i]=a[i][j];
         else  continue;
         
       
       
     for(i=0;i<=4;i++)
       for(j=0;j<=4;j++)
         if(max[i]==a[i][j])
        {  p[i]=i;q[i]=j;break;}
          else continue; 
          
        
     
          
     
     for(j=0;j<=4;j++)
      for(i=0;i<=4;i++)
         if(min[j]>a[i][j])
           min[j]=a[i][j];
         else continue;
        
          
          
     for(j=0;j<=4;j++)
       for(i=0;i<=4;i++)
         if(min[j]==a[i][j])
          { x[j]=i;y[j]=j;}
          else continue; 
 
         
     for(i=0;i<=4;i++)
      for(j=0;j<=4;j++)
        if((max[i]==min[j])&&(p[i]==x[j])&&(q[i]==y[j])) 
         cout<<p[i]+1<<" "<<q[i]+1<<" "<<max[i];
        else sum=sum+1;
        
     if(sum==25)
      cout<<"not found"<<endl;
           return 0;
      }
//**********************
//* ??? ????    *
//* ??? 1200012878  *
//* 11?9?            *
//**********************
int main ()
{
	int a[5][5] = {{0,0}}, max[5] = {0}, min[5] = {0}, i, j, flag = 0;
	for (i = 0; i <= 4; i++)
	{
		for (j = 0; j <= 4; j++)
			cin >> a[i][j];
	}
	for (i = 0; i <= 4; i++)
	{
		max[i] = a[i][0];
		min[i] = a[0][i];
		for (j = 1; j <= 4; j++)
		{
			if (a[i][j] > max[i])
				max[i] = a[i][j];
			if (a[j][i] < min[i])
				min[i] = a[j][i];
		}
	}
	for (i = 0; i <= 4; i++)
	{
		for (j = 0; j <= 4; j++)
		{
			if (a[i][j] == max[i] && a[i][j] == min[j])
			{
				cout << i + 1 << " " << j + 1 << " " << a[i][j] << endl;
				flag = 1;
			}
		}
	}
	if (flag == 0)
		cout << "not found";
	return 0;
}
int main()
{
	int s[5][5],q,n,flag=0,max,min;
	for(int i=0;i<5;i++)
		{
		for(int j=0;j<5;j++)
			cin>>s[i][j];
		}

	for(int i=0;i<5;i++)
		for(int j=0;j<5;j++)
	{
			{max=s[i][j];
			min=s[i][j];
               n=i;q=j;

				for(int p=0;p<5;p++)
				{ if(s[i][p]>max){max=s[i][p];q=p;}}

				for(int m=0;m<5;m++)
					{if(s[m][j]<min){min=s[m][j];n=m;}}

		      if(i==n&&q==j){cout<<n+1<<' '<<q+1<<' '<<s[n][q]<<endl;flag=1;}

			}

	}

if(flag==0)cout<<"not found"<<endl;
		return 0;

}
int main()
{
	int a[5][5],b[5][5],site[5][5];
	int i,j,s,tmp;
	s=0;
	for(i=0;i<=4;i++)
	{
		for(j=0;j<=4;j++)
		{
	        scanf("%d",&a[i][j]);
			site[i][j]=0;
		}
	}
	for(i=0;i<=4;i++)
	{
		tmp=0;
		site[i][tmp]=1;
		for(j=0;j<=4;j++)
		{
			if(a[i][tmp]<a[i][j])
			{
				site[i][tmp]=0;
				site[i][j]=1;
				tmp=j;
			}
		}
	}
    for(j=0;j<=4;j++)
	{
		tmp=0;
		site[tmp][j]=site[tmp][j]&&1;
		for(i=1;i<=4;i++)
		{
			if(a[tmp][j]>a[i][j])
			{
				site[tmp][j]=0;
				site[i][j]=site[i][j]&&1;
				tmp=i;
			}
			else
			{
				site[i][j]=0;
			}
		}
	}
	for(i=0;i<=4;i++)
	{
		for(j=0;j<=4;j++)
		{
			if(site[i][j]==1)
			{
				printf("%d %d %d\n",i+1,j+1,a[i][j]);
				s++;
				break;
			}
		}
	}
	if(s==0) printf("not found");

	return 0;
}