#include <bits/stdc++.h>
using namespace std;
int main() {
  int m, n;
  cin >> m >> n;
  vector<string> kaif;
  for (int i = 0; i < m; i++) {
    string s;
    cin >> s;
    kaif.push_back(s);
  }
  char salman[m][n];
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) salman[i][j] = '.';
  }
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (j + 2 < n && i + 2 < m) {
        if (kaif[i][j] == '#' && kaif[i][j + 1] == '#' &&
            kaif[i][j + 2] == '#' && kaif[i + 1][j] == '#' &&
            kaif[i + 1][j + 2] == '#' && kaif[i + 2][j] == '#' &&
            kaif[i + 2][j + 1] == '#' && kaif[i + 2][j + 2] == '#') {
          salman[i][j] = '#';
          salman[i][j + 1] = '#';
          salman[i][j + 2] = '#';
          salman[i + 1][j] = '#';
          salman[i + 1][j + 2] = '#';
          salman[i + 2][j] = '#';
          salman[i + 2][j + 1] = '#';
          salman[i + 2][j + 2] = '#';
        }
      }
    }
  }
  int count = 0;
  for (int i = 0; i < m; i++) {
    for (int j = 0; j < n; j++) {
      if (kaif[i][j] == salman[i][j]) count++;
    }
  }
  if (count == m * n)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
