#include<stdio.h>
#include<string.h>
_Bool ifMap[10][10];
_Bool flag = 0;
_Bool ifMap_via[10][10];
void bfs(int i, int j)
{
ifMap_via[i][j] = 1;
if(i == 9 && j == 9)
{
flag = 1;
return;
}
if (i + 1 >= 0 && i + 1 <= 9 && j >= 0 && j <= 9 && ifMap[i + 1][j] == 1 && ifMap_via[i + 1][j] == 0)
{
bfs(i + 1, j);
ifMap_via[i + 1][j] = 0;
}
if (i - 1 >= 0 && i - 1 <= 9 && j >= 0 && j <= 9 && ifMap[i - 1][j] == 1 && ifMap_via[i - 1][j] == 0)
{
bfs(i - 1, j);
ifMap_via[i - 1][j] = 0;
}
if (i >= 0 && i <= 9 && j - 1 >= 0 && j - 1 <= 9 && ifMap[i][j - 1] == 1 && ifMap_via[i][j - 1] == 0)
{
bfs(i, j - 1);
ifMap_via[i][j - 1] = 0;
}
if (i >= 0 && i <= 9 && j + 1 >= 0 && j + 1 <= 9 && ifMap[i][j + 1] == 1 && ifMap_via[i][j + 1] == 0)
{
bfs(i, j + 1);
ifMap_via[i][j + 1] = 0;
}
}
int main()
{
char map[10];
memset(ifMap, 0, sizeof(ifMap));
memset(ifMap_via, 0, sizeof(ifMap_via));
for (int i = 0; i < 10; i++)
{
scanf("%s", map);
for (int j = 0; j < 10; j++)
{
if(map[j] == '.')
ifMap[i][j] = 1;
}
}
bfs(0, 0);
if(flag == 1)
printf("Yes");
else
printf("No");
return 0;
}