#include <bits/stdc++.h>
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  char a[1005][1005];
  for (int k = 0; k < n; k++) {
    scanf("%s", a[k]);
  }
  char b[1005][1005] = {0};
  for (int x = 1; x < n - 1; x++) {
    for (int y = 1; y < m - 1; y++) {
      if (a[x - 1][y] == '#' && a[x - 1][y - 1] == '#' &&
          a[x - 1][y + 1] == '#') {
        if (a[x][y + 1] == '#' && a[x][y - 1] == '#' &&
            a[x + 1][y - 1] == '#' && a[x + 1][y] == '#' &&
            a[x + 1][y + 1] == '#')
          b[x][y] = '2';
      }
    }
  }
  for (int x = 1; x < n - 1; x++) {
    for (int y = 1; y < m - 1; y++) {
      if (b[x][y] == '2') {
        a[x - 1][y] = '.';
        a[x - 1][y - 1] = '.';
        a[x - 1][y + 1] = '.';
        a[x][y - 1] = '.';
        a[x][y + 1] = '.';
        a[x + 1][y] = '.';
        a[x + 1][y - 1] = '.';
        a[x + 1][y + 1] = '.';
      }
    }
  }
  int book = 1;
  for (int k = 0; k < n; k++) {
    for (int y = 0; y < m; y++) {
      if (a[k][y] == '#') book = 0;
      if (book == 0) break;
    }
  }
  if (book == 1)
    printf("YES");
  else
    printf("NO");
}
