#include #include #include using namespace std; #define RREP(i,s,e) for (int i = e-1; i >= s; i--) #define rrep(i,n) RREP(i,0,n) #define REP(i,s,e) for (int i = s; i < e; i++) #define rep(i,n) REP(i,0,n) int main() { int h, w; cin >> h >> w; vector s; s.resize(h); rep (i,h) cin >> s[i]; bool found, yes = false; rep (di,h) rep (dj,w) { found = true; vector b = s; if (di == 0 && dj == 0) continue; rep (i,h) rep (j,w) { if (b[i][j] == '#') { if (i+di < h && j+dj < w && b[i+di][j+dj] == '#') b[i+di][j+dj] = '.'; else found = false; } } yes |= found; } if (yes) cout << "YES" << endl; else cout << "NO" << endl; return 0; }