semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
main()
{
   int i,j,a[5][5],x[5]={0},y[5],b[5],c[5],k=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++)
       {
          if(x[i]<a[i][j])
          {
             x[i]=a[i][j];
             b[i]=j;               
          }              
       }
   for(j=0;j<5;j++) 
   {  
      y[j]=a[0][j];
      for(i=0;i<5;i++)
     {
        if(y[j]>a[i][j])
          {
             y[j]=a[i][j];             
          }                
     } 
   } 
   for(i=0;i<5;i++)
      if(x[i]==y[b[i]])
      {
        k++;
        printf("%d %d %d",i+1,b[i]+1,x[i]);
      }
   if(k==0)
     printf("not found");
      
     
getchar();getchar();getchar();getchar();        
}
// ????
int main()
{
	int a[5][5]; // ????
	// row, column????????i,j,k????? max???????
	int row = 0, column = 0, i, j, k, flag, result = 0, max; 
	for (i = 0; i < 5; i++) // ???????
		for (j = 0; j < 5; j++)
			cin >> a[i][j];
	for (i = 0; i < 5; i++) 
	{
		max = 0;
		flag = 1;
		for (j = 0; j < 5; j++) // ?????????
		{
			if (a[i][j] > max)
			{
				max = a[i][j]; // max???????
				row = i;
				column = j;
			}
		}
		for (k = 0; k < 5; k++) // ??????????????
		{
			if (max > a[k][column]) // ???????????
			{
				flag = 0;
				break;
			}
		}
			if (flag == 1) // flag??1???????????
			{
				cout << (row + 1) << " " << (column + 1) << " " << max << endl;
				result = 1; 
			}
	}
	if (result == 0) // ???????
		cout << "not found";
	return 0;
}
main()
{     
      int i,j,k,m=0,n=0,t=0,p,a[5][5];
      for(i=0;i<5;i++)
      {
          for(j=0;j<5;j++)
          {
               scanf("%d",&a[i][j]);   
          }
      }
      for(i=0;i<5;i++)
      {
          p=a[i][0];
          m=i;
          for(j=0;j<5;j++)
          {
               if (p<a[i][j])
               {
                     n=j;
                     p=a[i][j];
               }    
          }
          if ((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]))
          {
               printf("%d %d %d",m+1,n+1,p);
               t++;
          }
          n=0;  
      } 
      if (t==0)
      printf("not found");
      
}
int main()
{  int num[5][5];
   int i,j;
   for(j=0;j<5;j++)                                         //???? 
      for(i=0;i<5;i++)
         {  cin>>num[j][i];
         }
   int maxhang;
   int minlie;
   int m;
   int k;
   int l=0;
    for(j=0;j<5;j++)                                        //?????? 
      for(i=0;i<5;i++)
         { k=0;
           maxhang=num[j][i];                                  
           for(m=0;m<5;m++)
             {  if(num[j][m]>maxhang)   k=k+1;             //????? 
             }
           minlie=num[j][i];
           for(m=0;m<5;m++)
              {  if(num[m][i]<minlie)   k=k+1;             //????? 
              }
           if(k==0)  
             {cout<<j+1<<' '<<i+1<<' '<<num[j][i];
              l=l+1;
             }                                                //??????? 
         }
   if(l==0)  cout<<"not found";
   return 0;
}
main()
{
      int a[5][5]={0};
      int i,j,k,m,n=0;
      for(i=0;i<=4;i++)
      {
           for(j=0;j<=4;j++)
           {
                scanf("%d",&a[i][j]);
           }
      }
      for(i=0;i<=4;i++)
      {
           for(j=0;j<=4;j++)
           {
                for(k=0;k<=4;k++)
                {
                    if(a[i][j]>=a[i][k])
                    continue;
                    else
                    break;
                }
                for(m=0;m<=4;m++)
                {
                    if(a[i][j]<=a[m][j])
                    continue;
                    else
                    break;
                }
                if(k==5&&m==5)
                {
                printf("%d %d %d\n",i+1,j+1,a[i][j]);
                n=1;
                }
           }
      }
      if(n==0)
      printf("not found");
      
}
struct dian
{
    int x;
    int y;
    int zhi;       
};
int main()
{
   int a[5][5];       
   int c,e,i,j,count=0;
   struct dian b[5];
   struct dian andian;
   for(i=0;i<5;i++)
   for(j=0;j<5;j++)
   scanf("%d",&a[i][j]);
   for(i=0;i<5;i++)            //  i ?? ?? 
   { 
                   int d=0;
                   andian.zhi=a[i][0];
                   andian.x=1;
                   andian.y=i+1;
                   for(j=1;j<5;j++)  {if(andian.zhi<a[i][j])  {andian.zhi=a[i][j];andian.x=1+j;}} //????????? 
                   c=andian.zhi;
                   for(j=0;j<5;j++) if(a[j][andian.x-1]<c)  d++;
                   if(d==0){printf("%d %d %d\n",andian.y,andian.x,andian.zhi);count++;}
   }
   if(count==0)  printf("not found");
getchar();getchar();getchar();
}
int main()
{
	int i,j,a[5][5],max[5],b[5],c[5],k,p=0;
	for(i=0;i<=4;i++)
	{
		c[i]=0;
		b[i]=0;
		for(j=0;j<=4;j++)
		{
			scanf("%d",&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)
		{
			printf("%d %d %d\n",i+1,b[i]+1,max[i]);
		}
		else
		{
			p=p+1;
		}
	}
	if(p==5)
	{
		printf("not found");
	}
	return 0;
}
//********************************
//*???????   **
//*?????? 1300012934 **
//*???2013.11.6  **
//********************************


int main()
{  
	int a[5][5], b[2][5] = {{INT_MIN, INT_MIN, INT_MIN, INT_MIN, INT_MIN},{INT_MAX, INT_MAX, INT_MAX, INT_MAX, INT_MAX}};
	int k = 0;
	
	for (int i = 0; i <= 4; i++)
	{
		for (int j = 0; j <= 4; j++)
		{
			cin >> a[i][j];
			if (a[i][j] >= b[0][i])
				b[0][i] = a[i][j];
			if (a[i][j] <= b[1][j])
				b[1][j] = a[i][j];
		}
	}
	for (int i = 0; i <= 4; i++)
	{
		for (int j = 0; j <= 4; j++)
		{
			if (a[i][j] == b[0][i] && a[i][j] == b[1][j])
			{
				cout << i + 1 << " " << j + 1 << " " << a[i][j];
				k = 1;
			}
		}
	}
	if (k == 0)
		cout << "not found";


	return 0;

}
//********************************
//*??????? **
//*??????  1200062706**
//*???2012.11.13  **
//********************************

int main()
{
	int i, j, x[5][5];
	for (i = 0; i < 5; i++)
	{
		for (j = 0; j < 5; j++)
		{
			int a;
			cin >> a;
			x[i][j] = a;
		}
	}
	int y[5];
	for (i = 0; i < 5; i++)
	{
		int max = 0;
		for (j = 0; j < 5; j++)
		{
			if (max > x[i][j])
				max = max;
			else
				max = x[i][j];
			y[i] = max;
		}
	}
	int y1[5];
	for (i = 0; i < 5; i++)
	{
		int min = x[0][i];
		for (j = 0; j < 5; j++)
		{
			if (min < x[j][i])
				min = min;
			else
				min = x[j][i];
			y1[i] = min;
		}
	}
    int k = 0;
	for (i = 0; i < 5; i++)
	{
		for (j = 0; j < 5; j++)
		{
			if (y[i] == y1[j])
				cout << i + 1 << " " << j + 1 << " " << y[i] << endl;
			else
				k = k + 1;
			if (k == 25)
				cout << "not found" << endl;	
		}
	}

	return 0;
}
main()
{
    int i,j,k;
    int a[5][5];
    int p,q;
    int t=0;
    for(i=0;i<=4;i++)
    {
        for(j=0;j<=4;j++)
        {
            scanf("%d",&a[i][j]);
        }
    }
    for(i=0;i<=4;i++)
    {
        for(j=0;j<=4;j++)
        {
            p=0;
            q=0;
            for(k=0;k<=4;k++)
            {
                if(a[i][k]>a[i][j])
                {
                    p=1;
                }
                if(a[k][j]<a[i][j])
                {
                    q=1;
                }
            }
            if(p==0&&q==0)
            {
                printf("%d %d %d\n",i+1,j+1,a[i][j]);
                t=1;
            }
        }
    }
    if(t==0)
    printf("not found");
}
/*?????? (5*5)??????????????????????? 
?????????????????????????????????not found? 
*/

int max(int a,int b,int c,int d,int e)
{
    int t=a;
    if (b>t) t=b;
    if (c>t) t=c;
    if (d>t) t=d;
    if (e>t) t=e;
    return t;
}
int min(int a,int b,int c,int d,int e)
{
    int t=a;
    if (b<t) t=b;
    if (c<t) t=c;
    if (d<t) t=d;
    if (e<t) t=e;
    return t;
}
    
int main()
{
     //  printf ("%d\n",max(3,5,7,2,4));
     //  printf ("%d\n",min(3,5,7,2,4));
    int a[5][5],i,j,check=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++)
       {
           if (a[i][j]==max(a[i][0],a[i][1],a[i][2],a[i][3],a[i][4]) && a[i][j]==min(a[0][j],a[1][j],a[2][j],a[3][j],a[4][j]))
           {
               printf ("%d %d %d\n",i+1,j+1,a[i][j]);
               check=1;
           }
       }
    }
    if (check==0) printf ("not found");
    return 0;
}
int main()
{
  int a[5][5];
  int i,j,b=0,c=0,n=0,k;
  for(i=0;i<5;i++)
    {
      for(j=0;j<5;j++)
      scanf("%d",&a[i][j]);
    }
  for(i=0;i<5;i++)
    { 
      b=0;
      c=0;
      for(j=0;j<5;j++)
       {
         if(a[i][j]>b)
         b=a[i][j];
       }
      for(j=0;j<5;j++)
       { 
         if(a[i][j]==b)
           { 
             c=a[0][j];
             for(k=0;k<5;k++)
               {
                 if(a[k][j]<c)
                 c=a[k][j];
               }
             if(b==c)
               {
                 n++;
                 if(n==1)
                 printf("%d %d %d",i+1,j+1,b);
                 if(n>1)
                    {
                        printf(" ");
                        printf("%d",i,j,b);
                    }
               }        
           }
       }
    } 
if(n==0)
printf("not found");
return 0;
}
int main () {
	int a[5][5],c,b,i,j,e,f;                   
	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++){
			e=0;
	        f=0;
			for(c=0;c<5;c++){
				if(a[i][j]>=a[i][c]){
					e++;
				}
			} 
			for(b=0;b<5;b++){
				if(a[i][j]<=a[b][j]){
					f++;
				}
			}
			if(e==5&&f==5){
				printf("%d %d %d",i+1,j+1,a[i][j]);
				break ;
			}
		}
		if(e==5&&f==5){
			break ;
		}
	}
	if(e!=5||f!=5){
		printf("not found");
	}
	return 0;
}
int main()
{
	int a[5][5];
	int i , j , i1 , j1 , m = 0 ;
	for( i = 0 ; i < 5 ; i++ )
	{
		for( j = 0 ; j < 5 ; j++ )
			cin >> a[i][j] ;
	}
	for( i1 = 0 ; i1 < 5 ; i1++ )
	{
		for( j1 = 0 ; j1 < 5 ; j1++ )
		{
			if( a[i1][j1] >= a[i1][0] && a[i1][j1] >= a[i1][1] && a[i1][j1] >= a[i1][2] && a[i1][j1] >= a[i1][3] && a[i1][j1] >= a[i1][4] )
				if( a[i1][j1] <= a[0][j1] && a[i1][j1] <= a[1][j1] && a[i1][j1] <= a[2][j1] && a[i1][j1] <= a[3][j1] && a[i1][j1] <= a[4][j1] )
					{
						cout << i1 + 1 << " " << j1 + 1 << " " << a[i1][j1] << endl ;
						m++;
						break;
					}
			if( m != 0 )
				break;
		}
		if( m != 0 )
			break;
	}
	if( m == 0 )
		cout <<  "not found" << endl;
	return 0;
}
int main()
{
	int a[5][5];
	int i,j,k;
	int r,c=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++)
		{
			r=0;
			for(k=0;k<5;k++)
			{
				if(a[i][k]>a[i][j])
					r=1;
			}
			if(r==0)
				for(k=0;k<5;k++)
				{
					if(a[k][j]<a[i][j])
						r=1;
				}
			if(r==0)
			{
				printf("%d %d %d",i+1,j+1,a[i][j]);
				c=1;
				break;
			}
		}
		if(r==0)
			break;
	}
	if(c==0)
		printf("not found");
}
int main ()
{
 int a[6][6];
 int i,j;
 for(i=1;i<=5;i++)
 {   for(j=1;j<=5;j++)
      {
           scanf("%d",&a[i][j]);
       }
 }
 int l=0;
 for(i=1;i<=5;i++)
    {  
       int s=1,t,f=0;
       int m=a[i][1];
       for(j=1;j<=5;j++)
        {
          if(a[i][j]>m)  {  m=a[i][j]; s=j;  }
         }
       for(t=1;t<=5;t++)
        {     
          if(a[t][s]<m)  { f=1; break;}
        }
       if(f==1)  continue;
       printf("%d %d %d",i,s,a[i][s]);
       l=l+1;
     }
 if(l==0)  printf("not found");
  return 0;

  }
int main()
{
    int flag = 0;
    int g;
    int k;
    int a[5][5];
    int i;
    int row[5];
    int column;
    int temp;
    int j;
    for (i = 0; i < 5; i++)
    {
        for (j = 0; j < 5; j++)
        {
            cin >> a[i][j];
        }
    }
    for (i = 0; i < 5; i++)
    {
        column = 0;
        temp = a[i][0];
        for (j = 1; j < 5; j++) 
        {
            if (a[i][j] > temp)
            {
                temp = a[i][j];
                column = j;
            }
        }
        row[i] = column;
    }
    for (i = 0; i < 5; i++)
    {
        g = 0;
        k = row[i];
        for (j = 0; j < 5; j++)
        {
            if (a[j][k] < a[i][k])
            {
                g++;
            }
        }
        if (g == 0)
        {
            cout << i + 1 << " " << k + 1 << " " << a[i][k] << endl;
            flag ++ ;
        }
    }
    if (flag == 0)
    {
        cout << "not found" <<endl;
    }
    return 0;
}
int main(int argc, char* argv[])
{
	int a[5][5];
	int max,min,k=0;
	int i,j,l,f;
	int g=1;
	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];
        for(j=0;j<5;j++){
			if(max<=a[i][j]){
				max=a[i][j];
				k=j;
			}
		}
		min=a[0][k];
        for(l=0;l<5;l++){
			if(min>=a[l][k]){
				min=a[l][k];
			    f=l;
			}
		}
		if(f==i){
			printf("%d %d %d",f+1,k+1,a[f][k]);
			g=0;
		}
	}
	if(g!=0){
		printf("not found");
	}
	return 0;
}
int main ()
{
	int a[5][5],max[5],min[5],i,b,c,j,k=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[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];
			}


		}
	}
	for(j=0;j<5;j++){
		for(i=0;i<5;i++){
            if(a[i][j]<min[j]){
				min[j]=a[i][j];
			}
		}
	}






	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(min[j]==max[i]){
				b=i+1;
				c=j+1;
				printf("%d %d ",b,c);
				printf("%d",max[i]);
				k++;

			}

			

			
		}
	}
	if(k==0){
		printf("not found");
	}

			
	return 0;
}
int main()
{
  int a[5][5];
  int b[5][5];   
  int c[5][5];  
  int d[5][5];
  int i,j;      
  int sum=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[i][j]=a[i][j];
         c[i][j]=j; 
         d[i][j]=i;                
    }
  } 
  for(i=0;i<=4;i++)
  {
    for(j=0;j<=3;j++)
    {
      if(b[i][j]>=b[i][j+1])
      {
        int e=b[i][j];
        b[i][j]=b[i][j+1];
        b[i][j+1]=e;
        int f=c[i][j];
        c[i][j]=c[i][j+1];
        c[i][j+1]=f;                      
      }                 
    }               
  } 
  for(i=0;i<=4;i++)
  {
	  j=c[i][4];
	  for(int k=0;k<=4;k++)
	  {
		  if(k<4)
		  {
		    if(a[k][j]<b[i][4])
			{
			  break;
			}
		  }
		  if(k==4)
		  {
		    if(a[k][j]>=b[i][4])
			{
			  printf("%d %d %d\n",1+d[i][4],1+c[i][4],b[i][4]);
			  sum=sum+1;
			}
		  }
	  }
  }
  if(sum==0)
  {
    printf("not found");
  }
return 0;
}
//************************************************************************
//*???7-4.cpp                                                         
//*???????                                                     
//*??????                                                          
//*???2013?11?10?                                                   
//************************************************************************
int main()
{
	int a[7][7], i, j , k,  flag  , max, maxj;
	
	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];            //??????????????
		maxj = 0;                 //???????
		flag = 1;                 //??????
		for(j = 0; j < 5; j++)
		{
			if(a[i][j] > max)
			{
				max = a[i][j];     //??????????????
				maxj = j;
			}
		}
		for(k = 0; k < 5; k++)    //????????????
		{
			if(a[k][maxj] < max)
			{
				flag = 0;       //????????????????
				break;
			}
		}
		if(flag)              //???????????????????
		{
			cout << i + 1 << " " << maxj + 1 << " " << a[i][maxj] << endl;				
			break;
		}
	}
	if(!flag)    //???????????????????
		cout << "not found" << endl; 
	return 0;
}
//* * * * * * * * * * * * * * * * * * * * * * * * 
//*????1000012839_1                         *
//*???? ????                            *
//*?????                                   *
//*???2010.11.05                             *
//* * * * * * * * * * * * * * * * * * * * * * * * 

int main()
{
	int i, j, k, m, N;	//	????i,j,k,m,N?
    int max, min;	//	max?min????????????????????
    int a[5][5];	//	???????
	 for (i = 0; i < 5; i++)
        for (j = 0; j < 5; j++)
            cin >> a[i][j];	//	???????????	
	for (i = 0, N = 0; i < 5; i++)
    {
        max = a[i][0];	//	??????????max;
        k = 0;
        for (j = 1; j < 5; j++)
        {
            if (a[i][j] > max)
            {
                max = a[i][j];
                k = j;	//	?????????????j??k?
            }
        }
        min = a[0][k];	//	???k?????min?
        m = 0;
        for (j = 1; j < 5; j++)
        {
            if (min > a[j][k])
            {
                min = a[j][k];
                m = j;	//	??k?????????j??m?
            }
        }
        if (m == i)	//	???k?????????i???????
		{
			cout << i + 1 << ' ' << k + 1 << ' ' << a[i][k] << endl;	//	??????
			N++;
		}
	}
	if (N == 0)	
		cout << "not found" << endl;	//	????????"not found";

	return 0;
}
int main()
{
	int i,j,k,p=0,q=0,r,s;  //i,j,k??????p,q??????r,s?????????????
	int a[5][5],m[5]={0},n[5]={0};  //??????a[5][5]?????????????m[5]?????????????n[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]>m[i])
			{
				m[i]=a[i][j];
				n[i]=j;
			}
		}
		j=0;
	}
	i=0;j=0;
	for(i=0;i<5;i++)
	{
		j=n[i];
		for(k=0;k<5;k++)
		{
			if(a[k][j]<m[i])
			{
				p=1;
				break;
			}
		}
		if(p==1)
		{
			p=0;
			continue;
		}
		else
		{
			r=i+1;s=j+1;
			cout<<r<<' '<<s<<' '<<m[i]<<endl;
			q=1;
			break;
		}
	}
	if(q==0)
	{
		cout<<"not found"<<endl;
	}
	return 0;
}
int main()
{
	int a[10][10],b[10],c[10],min[5]={10000000,10000000,10000000,10000000,10000000},max[10]={-10000000,-10000000,-10000000,-10000000,-10000000},i,j,k,l,m,n,o=0,p;
	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++)
		{
			//printf("%d %d %d %d\n",i,j,a[i][j],max[i]);
			if(a[i][j]>max[i]) 
			{
				
				max[i]=a[i][j];
				//printf("%d",j);
				b[i]=j;
			}
		}
	}
	//printf("1111111");
	for(j=0;j<5;j++)
	{
		for(i=0;i<5;i++)
		{
			//printf("%d %d %d %d\n",i,j,a[i][j],min[j]);
			if(a[i][j]<min[j])
			{
				min[j]=a[i][j];
				c[j]=i;
			}
		}
	}
	//printf("222222");
	for(i=0;i<5;i++)
	{
		//printf("33333");
		//printf(" %d %d\n",i,b[i]);
		if(c[b[i]]==i)
		{o++;
		printf("%d %d %d\n",i+1,b[i]+1,a[i][b[i]]);}
	}
	if(o==0) printf("not found");
	//scanf("%d",&k);
	return 0;
}
int main(){
	int sz[5][5],ss[5][5],i,j,h[5],l[5],a;
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			scanf("%d",&sz[i][j]);
			ss[i][j]=sz[i][j];
		}
	}
	for(i=0;i<5;i++){
		for(j=1;j<5;j++){
			if(sz[i][j-1]>sz[i][j]){
				a=sz[i][j];
				sz[i][j]=sz[i][j-1];
				sz[i][j-1]=a;
			}
		}
		h[i]=sz[i][4];
	}
	for(j=0;j<5;j++){
		for(i=1;i<5;i++){
			if(ss[i-1][j]<ss[i][j]){
				a=ss[i][j];
				ss[i][j]=ss[i-1][j];
				ss[i-1][j]=a;
			}
		}
		l[j]=ss[4][j];
	}
	for(i=0;i<5;i++){
		for(j=0;j<5;j++){
			if(h[i]==l[j]){
				printf("%d %d %d",i+1,j+1,l[j]);
				break;
			}
		}
		if(j!=5){
			break;
		}
	}
	if(i==5&&j==5&&h[4]!=l[4]){
		printf("not found");
	}
	return 0;
}
void main()
{
	int a[5][5],c,t=1,i,j,k,max,colum,row;
	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];
		colum=0;
		row=i;
		for(j=1;j<5;j++)
		{
			if(a[i][j]>max)
			{
				max=a[i][j];
				colum=j;
			}
		}
		c=1;
		for(k=0;k<5;k++){
			if(a[k][colum]<a[row][colum])
				c=0;}
		if(c){printf("%d %d %d",row+1,colum+1,a[row][colum]);t=0;}
	}
	if(t)printf("not found");
}
int max(int n,int *a);
int min(int n,int *a);

int main()
{
	int num0[5][5],num1[5][5];
	for(int i=0;i<5;i++)
	for(int j=0;j<5;j++)
	{
		cin>>num0[i][j];
		num1[j][i]=num0[i][j];
	}
	int flag=1;
	for(int i=0;i<5;i++)
	{
		for(int j=0;j<5;j++)
		{
			if(num0[i][j]==max(5,num0[i])&&num1[j][i]==min(5,num1[j]))
			{
				cout<<i+1<<' '<<j+1<<' '<<num0[i][j]<<endl;
				flag=0;
				break;
			}
		}
	}
	if(flag)
	cout<<"not found"<<endl;
	return 0;
}

int max(int n,int *a)
{
	int max=a[0];
	for(int i=0;i<n;i++)
	{
		if(a[i]>max)
		max=a[i];
	}
	return max;
}

int min(int n,int *a)
{
	int min=a[0];
	for(int i=0;i<n;i++)
	{
		if(min>a[i])
		min=a[i];
	}
	return min;
}
main()
{
      int i,j;
      int a[5][5];
      int max[5];
      int min[5];
      int b;
      int k=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[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])
                          {                  
                                             b=min[j];
                                            printf("%d %d %d",i+1,j+1,b);
                                            k++;
                          }
                          }
                          }
                          if(k==0)
                          printf("not found");
                          }
int main()
{
	int i,j,k,l=0,e,m,n,f,a[5][5];
	for(i=0;i<5;i++)
	{
		for(j=0;j<5;j++)
		{
			scanf("%d",&a[i][j]);
		}
	}
	for(k=0;k<5;k++)
	{e=0;
	 for(j=0;j<5;j++)
	 {
	        
			if(a[k][j]>e)
			{
				e=a[k][j];
				m=j;
			}
	 }
	 for(i=0;i<5;i++)
	 {
		if(a[i][m]<e)
		{
		break;
	    }	 
	 }
	 if(i==5)
	 {
	 printf("%d %d %d",k+1,m+1,e);
	 l=1;
	 }
   }
   if(l==0)
   {
		printf("not found");
	}
		 return 0;
}
int op[5][5];
int vis[5][5]={0};


int main()
{
    for(int i=0;i<5;i++)
      for(int j=0;j<5;j++)
       cin >> op[i][j];
    for(int i=0;i<5;i++)
     for(int j=0;j<5;j++)
      {
             for(int col=0;col<5;col++)
               if(op[i][j]<op[i][col])
                vis[i][j]=1;
             for(int cow=0;cow<5;cow++)
               if(op[i][j]>op[cow][j])
                vis[i][j]=1;
      }
      int sum=0;
      for(int i=0;i<5;i++)
       for(int j=0;j<5;j++)
         {
               if(vis[i][j]==0)
               {cout << i+1<<" " << j+1 <<" "<< op[i][j] <<endl;
                sum++;
                }
         }
     if(sum==0) cout<<"not found"<<endl;
     return 0;
}
int main()
{
	int a[5][5] = {0};
	int i, j;
	for (i = 0; i <= 4; i++)
		cin >> a[0][i];
	
	for (i = 0; i <= 4; i++)
		cin >> a[1][i];
	
	for (i = 0; i <= 4; i++)
		cin >> a[2][i];
	
	for (i = 0; i <= 4; i++)
		cin >> a[3][i];
	
	for (i = 0; i <= 4; i++)
		cin >> a[4][i];
	int max = 0, b = 0, right = 1, flag = 0;
	for (i = 0; i <= 4; i++)
	{
		max = 0;
		right = 1;
		for (j = 1; j <= 4; j++)
		{
			if (a[i][j] > a[i][max])
				max = j;
		}
		for (b = 0; b <= 4; b++)
		{
			if (a[b][max] < a[i][max])
			{
				right = 0;
				break;
			}
		}
		if (right == 1)
		{
			cout << i + 1 << " " << max + 1<< " " << a[i][max] << endl;
			flag = 1;
		}
	}
	if (flag == 0)
		cout << "not found" << endl;
	return 0;
}
const int N=5;

int max(int a[])
{
	int i,m=0;
	for(i=1;i<N;i++)
		if(a[i]>a[m]) m=i;
	return m;
}

int min(int a[N][N],int m,int n)
{
	int i;
	for(i=0;i<N;i++)
		if(a[i][n]<a[m][n]) return 0;
	return 1;
}

main()
{
	int a[N][N],i,j,n;
	for(i=0;i<N;i++)
		for(j=0;j<N;j++)
			scanf("%d",*(a+i)+j);
	for(i=0;i<N;i++)
	{
		n=max(a[i]);
		if(min(a,i,n))
		{
			printf("%d %d %d",i+1,n+1,a[i][n]);
			return 0;
		}
	}
	printf("not found");
}
int main(){
	int sz[5][5],hang,lie;
	int row,col,min,i,j;

	for(row=0;row<5;row++){
		for(col=0;col<5;col++){
			scanf("%d",&sz[row][col]);
		}
	}
	i=0;
	for(col=0;col<5;col++){
		min=sz[0][col];
		lie=col;
		for(row=0;row<5;row++){
			if(sz[row][col]<=min){
				min=sz[row][col];
				hang=row;
			}
		}
		j=0;
		col=0;
		while(col<5){
			if(min>=sz[hang][col]){
				j++;
			}
			col++;
		}
		if(j==5){
			printf("%d %d %d\n",hang+1,lie+1,min);
			i++;
		}
		col=lie;

	}
	if(i==0){
		printf("not found");
	}

	return 0;
}