#include using namespace std; int h,w,cnt; char s[60][60],t[60][60]; int main(){ cin>>h>>w; for(int i=1;i<=h;++i) for(int j=1;j<=w;++j){ cin>>s[i][j]; if(s[i][j]=='#') ++cnt; } if(cnt>=2){ for(int dx=-h+1;dx<=h-1;++dx) for(int dy=-w+1;dy<=w-1;++dy){ if(dx==0&&dy==0) continue; memcpy(t,s,sizeof(s)); int tot=cnt; for(int x=1;x<=h;++x) for(int y=1;y<=w;++y){ int xx=x+dx,yy=y+dy; if(xx<1||xx>h||yy<1||y>w) continue; if(t[x][y]=='#'&&t[xx][yy]=='#'){ t[x][y]='R'; t[xx][yy]='B'; tot-=2; } } if(tot==0){ cout<<"YES"<