#include #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using pii = pair; char s[105][105]; int main() { int h, w; cin >> h >> w; rep(i, 105) rep(j, 105) s[i][j] = '.'; rep(i, h) rep(j, w) cin >> s[i][j]; rep(dy, h) rep(dx, w) { if (dy == 0 && dx == 0) continue; char c[105][105]; rep(i, 105) rep(j, 105) c[i][j] = '.'; rep(i, h) rep(j, w) c[i][j] = s[i][j]; bool ok = true; rep(y, h) rep(x, w) { int ny = y + dy; int nx = x + dx; if (c[y][x] == '#' && c[ny][nx] != '#') ok = false; if (c[y][x] != 'r' && c[ny][nx] == 'b') ok = false; if (c[y][x] == '#' && c[ny][nx] == '#') { c[y][x] = 'r'; c[ny][nx] = 'b'; } } if (ok) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }