#include <bits/stdc++.h>
#define fi first
#define se second
using namespace std;
using LL = long long;
constexpr int N = 2e5 + 5;
int n, m;
string a[105];
bool vt[105][105], flg;
int dx[] = {-1, 1, 0, 0};
int dy[] = {0, 0, -1, 1};
bool dfs(int x, int y) {
if (x == n && y == m) return true;
for (int i = 0; i < 4; ++i) {
int nx = x + dx[i], ny = y + dy[i];
if (nx < 1 || nx > n || ny < 1 || ny > m || vt[nx][ny] || a[nx][ny] == '#')continue;
vt[nx][ny] = true;
if (dfs(nx, ny))return true;
}
return false;
}
void solve() {
cin >> n >> m;
for (int i = 1; i <= n; ++i)cin >> a[i], a[i] = " " + a[i];
vt[1][1] = true;
if (dfs(1, 1))cout << "Yes\n";
else cout << "No\n";
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout << fixed << setprecision(15);
int tt = 1;
// cin >> tt;
while (tt--) solve();
}