#include <bits/stdc++.h>
using namespace std;
string cv[60];
string wall(60, '.');
int main(void) {
  int H, W;
  string s;
  cin >> H >> W;
  for (long long i = 1; i <= H; i++) {
    cin >> s;
    cv[i] = "." + s + ".";
  }
  cv[0] = wall;
  cv[H + 1] = wall;
  for (long long i = 1; i <= H; i++) {
    for (long long j = 1; j <= W; j++) {
      if (cv[i][j] == '#' && cv[i - 1][j] == '.' && cv[i + 1][j] == '.' &&
          cv[i][j - 1] == '.' && cv[i][j + 1] == '.') {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
}
