#include <bits/stdc++.h>
using namespace std;
const int N = 21;
int dx[] = {1,-1,0,0};
int dy[] = {0,0,1,-1};
struct node{
int x, y;
};
char mp[N][N];
bool vis[N][N];
queue<node>q;
void bfs()
{
q.push((node){1,1});
while(!q.empty())
{
node u = q.front();q.pop();
int x = u.x,y = u.y;
if(x == 10 && y == 10){ puts("Yes");return; }
if(vis[x][y]) continue;
vis[x][y] = 1;
for(int i = 0;i < 4; i++)
{
int nx = x + dx[i],ny = y + dy[i];
if(nx < 1 || nx > 10 || ny < 1 || ny > 10) continue;
if(mp[nx][ny] != '.') continue;
q.push((node){nx,ny});
}
}
puts("No");
}
signed main()
{
for(int i = 1;i <= 10; i++)
scanf("%s",mp[i] + 1);
bfs();
}
/*
...#....#.
#..##...##
.#....#...
..#####..#
##...#..##
##.#...###
##.####...
##.##..###
##.....###
######....
*/