#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;

void dfs(int x, int y) {
    if (flg)return;
    if (x == n && y == m) {
        flg = true;
        return;
    }
    if (x < 1 || x > n || y < 1 || y > m || a[x][y] == '#' || vt[x][y])return;
    vt[x][y] = true;
    dfs(x - 1, y);
    dfs(x + 1, y);
    dfs(x, y - 1);
    dfs(x, y + 1);
}

void solve() {
    cin >> n >> m;
    for (int i = 1; i <= n; ++i)cin >> a[i], a[i] = " " + a[i];
    dfs(1, 1);
    if (flg)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();
}