#include<bits/stdc++.h>
using namespace std;
const int N=25;
int a[N][N];
/*int check1(int i,int j)//检验左方向
{
if(a[i][j-1]>=1&&a[i][j-2]>=1&&a[i][j-3]>=1&&a[i][j-4]>=1)
return true;
return false;
}*/
int checky(int i,int j)//检验右方向
{
if(j+4<=19)
{
if(a[i][j]-a[i][j+1]==0&&a[i][j]-a[i][j+2]==0&&a[i][j]-a[i][j+3]==0&&a[i][j]-a[i][j+4]==0&&a[i][j]!=0)
return true;
}
return false;
}
/*int check3(int i,int j)//检验上方向
{
if(a[i-1][j]>=1&&a[i-2][j]>=1&&a[i-3][j]>=1&&a[i-4][j]>=1)
return true;
return false;
} */
int checkx(int i,int j)//检验下方向
{
if(i+4<=19)
{
if(a[i][j]-a[i+1][j]==0&&a[i][j]-a[i+2][j]==0&&a[i][j]-a[i+3][j]==0&&a[i][j]-a[i+4][j]==0&&a[i][j]!=0)
return true;
}
return false;
}
int checkzx(int i,int j)//检验左下方向
{
if(i+4<=19&&j-4>=1)
{
if(a[i][j]-a[i+1][j-1]==0&&a[i][j]-a[i+2][j-2]==0&&a[i][j]-a[i+3][j-3]==0&&a[i][j]-a[i+4][j-4]==0&&a[i][j]!=0)
return true;
}
return false;
}
int checkyx(int i,int j)//检验右下方向
{
if(i+4<=19&&j+4<=19)
{
if(a[i][j]-a[i+1][j+1]==0&&a[i][j]-a[i+2][j+2]==0&&a[i][j]-a[i+3][j+3]==0&&a[i][j]-a[i+4][j+4]==0&&a[i][j]!=0)
return true;
}
return false;
}
int main()
{
for(int i=1;i<=19;i++)
{
for(int j=1;j<=19;j++)
cin>>a[i][j];
}
int flag=0;
for(int i=1;i<=19;i++)
{
for(int j=1;j<=19;j++)
{
if(checky(i,j))
{
cout<<"i="<<i<<" y "<<"j="<<j<<endl;
flag=1;
cout<<a[i][j]<<endl;
return 0;
}
if(checkx(i,j))
{
cout<<"i="<<i<<" x "<<"j="<<j<<endl;
flag=1;
cout<<a[i][j]<<endl;
return 0;
}
if(checkzx(i,j))
{
cout<<"i="<<i<<" zx "<<"j="<<j<<endl;
flag=1;
cout<<a[i][j]<<endl;
return 0;
}
if(checkyx(i,j))
{
cout<<"i="<<i<<" yx "<<"j="<<j<<endl;
flag=1;
cout<<a[i][j]<<endl;
return 0;
}
}
}
if(!flag)
{
cout<<"no"<<endl;
return 0;
}
}
/*
1 2 2 1 2 2 0 1 0 0 0 0 0 0 0 0 0 0 0
1 2 0 2 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 2 0 1 1 0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
2 0 0 0 1 0 2 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 2 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 0 2 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 2 0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
*/