#include <bits/stdc++.h>
using namespace std;
int n, m;
char g[1024][1024];
bool chk[1024][1024];
void check(int x, int y) {
  if (g[x][y] == '#' and g[x + 1][y] == '#' and g[x + 2][y] == '#' and
      g[x][y + 1] == '#' and g[x + 2][y + 1] == '#' and g[x][y + 2] == '#' and
      g[x + 1][y + 2] == '#' and g[x + 2][y + 2] == '#') {
    ((void)0);
    chk[x][y] = chk[x + 1][y] = chk[x + 2][y] = chk[x][y + 1] =
        chk[x + 2][y + 1] = chk[x][y + 2] = chk[x + 1][y + 2] =
            chk[x + 2][y + 2] = true;
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < (n); i++) scanf("%s", g[i]);
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (m); j++)
      if (g[i][j] == '#') check(i, j);
  for (int i = 0; i < (n); i++)
    for (int j = 0; j < (m); j++)
      if (g[i][j] == '#' and !chk[i][j]) {
        cout << "NO" << endl;
        return 0;
      }
  cout << "YES" << endl;
  return 0;
}
