#include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector VI; typedef vector VVI; #define REP(i, n) for(int(i)=0;(i)<(n);++(i)) #define FOR(i, f, t) for(int(i)=(f);(i)<(t);(++i)) #define RREP(i, n) for(int(i)=(n)-1;(i)>=0;--(i)) const int MOD = int(1e9+7); int main(){ do { cin.tie(0); ios_base::sync_with_stdio(false); } while(0); int H,W; cin >> H >> W; vector v; REP(i,H){ string s; cin >> s; v.push_back(s); } int t = 0; REP(y,H)REP(x,W){ if(v[y][x] == '#') t++; } if(t%2 || t == 0){ cout << "NO" << endl; return 0; } REP(y,H) for(int x = -W+1; x < W; x++){ if(y == 0 && x == 0) continue; vector w = v; int c = 0; REP(y2,H)REP(x2,W){ int x3 = x2+x, y3 = y2+y; if(x3<0||y3<0||x3>=W||y3>=H) continue; if(w[y2][x2] == '#' && w[y3][x3] == '#'){ w[y2][x2] = w[y3][x3] = '$'; c += 2; } } if(t == c){ cerr << x << ":" << y << endl; cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }