#include <bits/stdc++.h>
using namespace std;
int a[1002][1002];
int b[1002][1002];
int main() {
  int n, m, i, j, f = 0;
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      char c;
      cin >> c;
      if (c == '#') {
        f++;
        a[i][j] = 1;
      } else {
        a[i][j] = 0;
      }
    }
  }
  for (i = 0; i < n - 2; i++) {
    for (j = 0; j < m - 2; j++) {
      if (a[i][j] == 1 && a[i + 1][j] == 1 && a[i + 2][j] == 1 &&
          a[i][j + 1] == 1 && a[i][j + 2] == 1 && a[i + 2][j + 1] == 1 &&
          a[i + 2][j + 2] == 1 && a[i + 1][j + 2] == 1) {
        b[i][j] = 1;
        b[i + 1][j] = 1;
        b[i + 2][j] = 1;
        b[i][j + 1] = 1;
        b[i][j + 2] = 1;
        b[i + 2][j + 1] = 1;
        b[i + 2][j + 2] = 1;
        b[i + 1][j + 2] = 1;
      }
    }
  }
  int s = 0;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if (b[i][j] == 1) s++;
    }
  }
  if (s == f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
