#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int H, W;
  cin >> H >> W;
  string S[60];
  for (int i = 0; i < H; i++) cin >> S[i];
  int A[60][60] = {0};
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (S[i][j] == '#') {
        ++A[i][j + 1];
        ++A[i + 2][j + 1];
        ++A[i + 1][j];
        ++A[i + 1][j + 2];
      }
    }
  }
  bool can = true;
  for (int i = 0; i < H; i++) {
    for (int j = 0; j < W; j++) {
      if (S[i][j] == '#') {
        if (A[i + 1][j + 1] == 0) can = false;
      }
    }
  }
  if (can)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
