#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
char m[20][20];
int d[][2] = {
{1,0},{0,1},{-1,0},{0,-1}
};
int vis[20][20];
bool dfs(int x, int y){
if(x == 9 && y == 9)
return true;
vis[x][y] = true;
bool ans = false;
for(int i = 0 ; i < 4 ; ++i){
int xx = x + d[i][0];
int yy = y + d[i][1];
if(xx < 0 || xx >= 10) continue;
if(yy < 0 || yy >= 10) continue;
if(vis[xx][yy]) continue;
if(m[xx][yy] == '#') continue;
vis[xx][yy] = true;
ans = ans | dfs(xx , yy);
vis[xx][yy] = false;
}
return ans;
}
int main(){
for(int i = 0 ; i < 10 ; ++i){
for(int j = 0; j < 10 ; ++j){
std::cin >> m[i][j];
}
}
if(dfs(0,0))
std::cout << "Yes";
else
std::cout << "No";
return 0;
}