#include<stdio.h>
#include<stdlib.h>
#define rep(i,j,k) for(int i = (j); i <= (k); i++)
#define N 10
typedef struct node
{
int x;
int y;
struct node* last;
struct node* next;
} Node;
typedef Node* LinkList;
int main()
{
//freopen("in.txt", "r", stdin);
char map[N][N + 1] = { 0 };
rep(i, 0, N - 1)
{
gets(map[i]);
}
/*rep(i, 0, N-1)
{
rep(j, 0, N-1)
printf("%c", map[i][j]);
printf("\n");
}*/
//create a list
LinkList head = (LinkList)malloc(sizeof(Node));
head->last = NULL;
head->x = 0;
head->y = 0;
map[0][0] = '0';
LinkList p = head;
int flag = 1;
while (p->x != N - 1 || p->y != N - 1)
{
LinkList pr = (LinkList)malloc(sizeof(Node));
if (map[p->x + 1][p->y] == '.')
{
pr->x = p->x + 1;
pr->y = p->y;
p->next = pr;
pr->last = p;
p = pr;
map[pr->x][pr->y] = '0';
}
else if (map[p->x][p->y + 1] == '.')
{
pr->x = p->x;
pr->y = p->y + 1;
p->next = pr;
pr->last = p;
p = pr;
map[pr->x][pr->y] = '0';
}
else if (p->y - 1 >= 0 && map[p->x][p->y - 1] == '.')
{
pr->x = p->x;
pr->y = p->y - 1;
p->next = pr;
pr->last = p;
p = pr;
map[pr->x][pr->y] = '0';
}
else if (p->x - 1 >= 0 && map[p->x - 1][p->y] == '.')
{
pr->x = p->x - 1;
pr->y = p->y;
p->next = pr;
pr->last = p;
p = pr;
map[pr->x][pr->y] = '0';
}
else
{
p = p->last;
if (p->x == 0 && p->y == 0)
{
flag = 0;
break;
}
}
}
if (flag)
printf("Yes\n");
else
printf("No\n");
return 0;
}