#include <bits/stdc++.h>
using namespace std;
inline int read(){
int x=0,f=1;char ch=getchar();
while(ch>'9'||ch<'0')ch=='-'&&(f=0)||(ch=getchar());
while(ch<='9'&&ch>='0')x=(x<<3)+(x<<1)+ch-'0',ch=getchar();
return f?x:-x;
}
int a[20][20];
int vis[20][20];
char s[20];
void dfs(int x, int y) {
vis[x][y] = 1;
if (x < 10 && !vis[x + 1][y] && !a[x + 1][y]) dfs(x + 1, y);
if (y < 10 && !vis[x][y + 1] && !a[x][y + 1]) dfs(x, y + 1);
if (x > 1 && !vis[x - 1][y] && !a[x - 1][y]) dfs(x - 1, y);
if (y > 1 && !vis[x][y - 1] && !a[x][y - 1]) dfs(x, y - 1);
}
int main() {
for (int i = 1; i <= 10; ++ i) {
scanf("%s", s + 1);
for (int j = 1; j <= 10; ++ j) {
a[i][j] = s[j] == '#';
}
}
dfs(1, 1);
puts(vis[10][10] ? "Yes" : "No");
}