#include <bits/stdc++.h>
using namespace std;
int n, m;
char arr[102][102];
int dx[] = {0, 0, 1, 0, -1};
int dy[] = {0, 1, 0, -1, 0};
void dfs(int x, int y)
{
arr[x][y] = '#';
if (x == n && y == m)
{
cout << "Yes";
exit(0);
}
else
{
for (int i = 0; i < 5; i++)
{
int tx = x + dx[i];
int ty = y + dy[i];
if (tx >= 1 && ty >= 1 && tx <= n && ty <= m && arr[tx][ty] == '.')
{
dfs(tx, ty);
}
}
}
}
int main()
{
cin >> n >> m;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= m; j++)
{
cin >> arr[i][j];
}
}
dfs(1, 1);
cout << "No";
return 0;
}