#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  char ch[n][m], ch1[n][m];
  for (int i = 0; i < n; i++) cin >> ch[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      ch1[i][j] = '.';
    }
  }
  for (int i = 0; i + 2 < n; i++) {
    for (int j = 0; j + 2 < m; j++) {
      if (ch[i][j] == '#') {
        bool f = true;
        for (int k = 0; k < 3; k++) {
          for (int l = 0; l < 3; l++) {
            if (l != 1 || k != 1) {
              if (ch[i + k][j + l] == '.') {
                f = false;
              }
            }
          }
        }
        if (f == true) {
          for (int k = i; k < i + 3; k++) {
            for (int l = j; l < j + 3; l++) {
              if (k == i + 1 && l == j + 1) continue;
              ch1[k][l] = '#';
            }
          }
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (ch[i][j] != ch1[i][j]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
