#include<iostream>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<string>
#include<algorithm>
#include <cstdlib>
#include<stdlib.h>
#include<sstream>
#include<stack>
using namespace std;
char a[107][107];
int b[107][107];
int main()
{
b[1][1] = 1;
int n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= m; j++)
{
cin >> a[i][j];
}
}
int i=1, j=1;
while (i != n || j != m)
{
if (a[i + 1][j] == '.' && b[i + 1][j] == 0)
{
b[i + 1][j] = 1;
i = i + 1;
}
else if (a[i][j + 1] == '.' && b[i][j + 1] == 0)
{
b[i][j + 1] =1;
j = j + 1;
}
else if (a[i - 1][j] == '.' && b[i - 1][j] == 0)
{
b[i - 1][j] = 1;
i = i - 1;
}
else if (a[i][j - 1] == '.' && b[i][j - 1] == 0)
{
b[i][j - 1] = 1;
j = j - 1;
}
if (i == n && j == m)
{
cout << "Yes";
return 0;
}
if (a[i + 1][j] != '.' && a[i][j + 1] != '.' && a[i - 1][j] != '.' && a[i][j - 1] != '.')
{
cout << "No";
return 0;
}
}
return 0;
}