#include <bits/stdc++.h>
using namespace std;
const int mx = 1e5 + 10;
const double eps = 1e-9;
const int inf = 1e9;
char a[1005][1005];
int dx[] = {0, 0, 0, 1, 2, 2, 2, 1};
int dy[] = {0, 1, 2, 2, 2, 1, 0, 0};
int n, m;
bool rng(int i, int j) { return i > -1 && i < n && j > -1 && j < m; }
bool ok(int x, int y) {
  bool first = 1;
  for (int i = 0; i < 8; i++) {
    int newx = x + dx[i];
    int newy = y + dy[i];
    if (!rng(newx, newy) || a[newx][newy] == '.') {
      return 0;
    }
  }
  return 1;
}
int main() {
  char c;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == '.') continue;
      bool first = 0;
      for (int k = 0; k < 8; k++) {
        int nx = i - dx[k], ny = j - dy[k];
        if (rng(nx, ny) && ok(nx, ny)) {
          first = 1;
          break;
        }
      }
      if (!first) {
        printf("NO");
        return 0;
      }
    }
  }
  printf("YES");
}
