#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 1010;
bool vis[MAXN][MAXN];
char s[MAXN][MAXN];
int dir[8][7][2] = {
    0,  1,  0,  2,  1,  0,  1,  2,  2,  0,  2,  1,  2,  2,  0,  -1, 0,  1,  1,
    -1, 1,  1,  2,  -1, 2,  0,  2,  1,  0,  -2, 0,  -1, 1,  -2, 1,  0,  2,  -2,
    2,  -1, 2,  0,  -1, 0,  -1, 1,  -1, 2,  0,  2,  1,  0,  1,  1,  1,  2,  -1,
    -2, -1, -1, -1, 0,  0,  -2, 1,  -2, 1,  -1, 1,  0,  -2, 0,  -2, 1,  -2, 2,
    -1, 0,  -1, 2,  0,  1,  0,  2,  -2, -1, -2, 0,  -2, 1,  -1, -1, -1, 1,  0,
    -1, 0,  1,  -2, -2, -2, -1, -2, 0,  -1, -2, -1, 0,  0,  -2, 0,  -1};
int n, m;
int main() {
  scanf("%d%d%d", &n, &m);
  memset(vis, 0, sizeof(vis));
  for (int i = 0; i < n; i++) {
    scanf("%s", s[i]);
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '#') vis[i][j] = 1;
    }
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (s[i][j] == '#' && vis[i][j]) {
        int mark = -1;
        for (int p = 0; p < 7; p++) {
          bool tag = false;
          for (int q = 0; q < 7; q++) {
            if (i + dir[p][q][0] < 0 || i + dir[p][q][0] >= n ||
                j + dir[p][q][1] < 0 || j + dir[p][q][1] >= m ||
                s[i + dir[p][q][0]][j + dir[p][q][1]] != '#') {
              tag = true;
              break;
            }
          }
          if (!tag) {
            mark = p;
            break;
          }
        }
        if (mark != -1) {
          bool tag = false;
          for (int q = 0; q < 8; q++) {
            vis[i + dir[mark][q][0]][j + dir[mark][q][1]] = 0;
          }
        } else {
          flag = false;
          break;
        }
      }
    }
    if (!flag) {
      break;
    }
  }
  if (flag) {
    printf("YES\n");
  } else
    printf("NO\n");
  return 0;
}
