#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  for (int i = 0; i < v.size(); i++) os << v[i] << " ";
}
template <typename T>
ostream& operator<<(ostream& os, const set<T>& v) {
  for (typename set<T>::iterator it = v.begin(); it != v.end(); it++)
    os << *it << " ";
}
const double eps = 1e-9;
const int mod = 1e9 + 7;
const int N = 1e3 + 5;
int sgn(double a) { return a < -eps ? -1 : a < eps ? 0 : 1; }
int gi() {
  int w = 0;
  bool q = 1;
  char c = getchar();
  while ((c < '0' || c > '9') && c != '-') c = getchar();
  if (c == '-') q = 0, c = getchar();
  while (c >= '0' && c <= '9') w = w * 10 + c - '0', c = getchar();
  return q ? w : -w;
}
char g[N][N];
int f[N][N];
int main() {
  int n = gi(), m = gi();
  for (int i = (1); i <= (n); i++) {
    scanf("%s", g[i] + 1);
  }
  for (int i = (1); i <= (n); i++) {
    for (int j = (1); j <= (m); j++) {
      if (g[i][j] == '#') {
        if (i + 2 > n) continue;
        if (j + 2 > m) continue;
        int flag = 0;
        for (int k = (0); k <= (2); k++) {
          for (int p = (0); p <= (2); p++) {
            if (k == 1 && p == 1) continue;
            if (g[i + k][j + p] != '#') {
              flag = 1;
            }
          }
        }
        if (!flag) {
          for (int k = (0); k <= (2); k++) {
            for (int p = (0); p <= (2); p++) {
              if (k == 1 && p == 1) continue;
              f[i + k][j + p] = 1;
            }
          }
        }
      }
    }
  }
  for (int i = (1); i <= (n); i++) {
    for (int j = (1); j <= (m); j++) {
      if (g[i][j] == '#') {
        if (f[i][j] == 0) {
          puts("NO");
          return 0;
        }
      } else {
        if (f[i][j] == 1) {
          puts("NO");
          return 0;
        }
      }
    }
  }
  puts("YES");
  return 0;
}
