#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); int H,W; cin >> H >> W; vector S(H); rep(i,H) cin >> S[i]; rep(dx,H)rep(dy,W)if(dx || dy) { vector T = S; rep(x,H)rep(y,W) { if(T[x][y] == '#' && x + dx < H && y + dy < W && T[x + dx][y + dy] == '#') { T[x][y] = 'R'; T[x + dx][y + dy] = 'B'; } } int ng = 0; rep(x,H)rep(y,W) if(T[x][y] == '#') ng = 1; if(!ng) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }