MLE 20pts
#include <bits/stdc++.h>
using namespace std;
const int N = 100+5;
int n,m;
char a;
int b[N][N];
int remi,remj;
int temp;
void dfs(int i,int j){
// cout << i << ' ' << j << ' ' << temp << endl;
if(i == 1 && j == 1){
temp = 1;
return;
}
if(i-1>0 && b[i-1][j] == 1 && i-1 != remi){
remi = i;
remj = j;
dfs(i-1,j);
}
if(j+1<=m && b[i][j+1] == 1 && j+1 != remj){
remj = j;
remi = i;
dfs(i,j+1);
}
if(j-1>0 && b[i][j-1] == 1 && j-1 != remj){
remj = j;
remi = i;
dfs(i,j-1);
}
if(i+1<=n && b[i+1][j] == 1 && i+1 != remi){
remi = i;
remj = j;
dfs(i+1,j);
}
b[i][j] = 2;
return;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
scanf("%d%d",&n,&m);
for(int i = 1;i <= n;++i){
for(int j = 1;j <= m;++j){
scanf("%c",&a);
// cout << a << endl;
// cout << i << ' ' << j << endl;
if((int)a == 35){
b[i][j] = 2;
// cout << b[i][j] << endl;
}
else if((int)a == 46){
b[i][j] = 1;
}
else{
j --;
}
}
}
// for(int i = 1;i <= n;i ++){
// for(int j = 1;j <= m;j ++){
// cout << b[i][j] << ' ';
// }
// cout << endl;
// }
remi = n;
remj = m;
dfs(n,m);
if(temp == 1){
printf("Yes");
return 0;
}
printf("No");
return 0;
}