#include<bits/stdc++.h>
using namespace std;
const int N = 101;
char a[N][N];
bool vis[N][N] = {false};
int dx[4] = {1, -1, 0, 0};
int dy[4] = {0, 0, -1, 1};
int n, m;
void dfs(int x, int y) {
vis[x][y] = true;
if (x == n && y == m) {
return;
}
for (int i = 0; i < 4; i++) {
int nx = x + dx[i];
int ny = y + dy[i];
if (1 <= nx && nx <= n && 1 <= ny && ny <= m && !vis[nx][ny] &&
a[nx][ny] == '.') {
dfs(nx, ny);
}
}
}
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
cin >> a[i][j];
}
}
dfs(1, 1);
if (vis[n][m])cout << "Yes\n";
else cout << "No\n";
return 0;
}