#include<bits/stdc++.h>
using namespace std;
int p[105][105],ok=0;
int a,b;
char a1[101][101];
const int dx[]={-1,1,0,0,0},dy[]={0,0,-1,1,0};
void dfs(int m,int n){
if(p[m][n]) return ;
p[m][n]=1;
if(m==b&&n==a) ok=1;
for(int i=0;i<4;++i){
int tx=m+dx[i];
int ty=n+dy[i];
if(1<=tx&&tx<=b&&1<=ty&&ty<=a&&a1[tx][ty]!='#'){
dfs(tx,ty);
}
}
}
int main(){
cin>>a>>b;
for(int i=1;i<=a;i++){
for(int j=1;j<=b;j++){
cin>>a1[i][j];
}
}
dfs(1,1);
if(ok==1){
cout<<"Yes";
}
else cout<<"No";
return 0;
}