#include<stdio.h>
#include<string.h>
#define N 15
int mv[15][15]={{-1,0},{0,1},{1,0},{0,-1}},vis[N][N];
int l=0,r=0;
typedef struct{
int x,y;
}P;
P q[N*N];
void Ainsert(int x,int y){
P pos;
pos.x=x;
pos.y=y;
q[r++]=pos;
}
int main(){
for(int i=0;i<=11;++i)
for(int j=0;j<=11;++j)
vis[i][j]=1;
for(int i=1;i<=10;++i){
char ch[15];
scanf("\n%s",ch);
for(int j=0;j<10;++j){
if(ch[j]=='.') vis[i][j+1]=0;
}
}
Ainsert(1,1);
vis[1][1]=1;
while(r>l){
P u=q[l];
if(u.x==10&&u.y==10){
printf("Yes\n");
return 0;
}
for(int i=0;i<=3;++i){
if(vis[u.x+mv[i][0]][u.y+mv[i][1]]) continue;
Ainsert(u.x+mv[i][0],u.y+mv[i][1]);
vis[u.x+mv[i][0]][u.y+mv[i][1]]=1;
}
++l;
}
printf("No\n");
return 0;
}