#include <bits/stdc++.h>
const int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
const int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
using namespace std;
long long max(long long a, int b) { return max(a, long long(b)); }
long long max(int a, long long b) { return max(long long(a), b); }
long long min(long long a, int b) { return min(a, long long(b)); }
long long min(int a, long long b) { return min(long long(a), b); }
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int w, h;
  cin >> h >> w;
  vector<string> v(h);
  for (long long i = 0; i < long long(h); ++i) cin >> v[i];
  int f = 1;
  for (long long i = 0; i < long long(h); ++i) {
    for (long long j = 0; j < long long(w); ++j) {
      if (v[i][j] == '#') {
        queue<pair<int, int> > q;
        q.push({i, j});
        v[i][j] = '.';
        int cnt = 0;
        while (!q.empty()) {
          pair<int, int> p = q.front();
          q.pop();
          int x = p.first, y = p.second;
          for (long long k = 0; k < long long(4); ++k) {
            int nx = x + dx[k * 2], ny = y + dy[k * 2];
            if (nx < 0 || ny < 0 || nx >= h || ny >= w) continue;
            if (v[nx][ny] == '#') {
              v[nx][ny] = '.';
              cnt++;
              q.push({nx, ny});
            }
          }
        }
        if (cnt == 0) f = 0;
      }
    }
  }
  if (f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
