#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) #define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++) #define ALL(x) (x).begin(), (x).end() const double PI = acos(-1); bool solve(vector bd) { int h = bd.size(), w = bd[0].size(); int target = 0; REP (i, h) REP (j, w) target += bd[i][j] == '#'; for (int y = 0; y < h; y++) { for (int x = 1-w; x < w; x++) { if (!x && !y) continue; vector tmp = bd; int cnt = 0; REP (i, h) REP (j, w) { if (tmp[i][j] != '#') continue; if (i+y < h && j+x >= 0 && j+x < w && tmp[i+y][j+x] == '#') { tmp[i][j] = tmp[i+y][j+x] = '.'; cnt += 2; } } if (cnt == target) return true; } } return false; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); int h, w; cin >> h >> w; vector bd(h); REP (i, h) cin >> bd[i]; if (solve(bd)) cout << "YES" << endl; else cout << "NO" << endl; return 0; }