#include <bits/stdc++.h>
std::vector<std::vector<int> > paper;
int n, m;
bool fits(int x, int y) {
  if (x < 1 || x > n - 2 || y < 1 || y > m - 2) return false;
  return (paper[x - 1][y - 1] + paper[x][y - 1] + paper[x + 1][y - 1] +
          paper[x + 1][y] + paper[x + 1][y + 1] + paper[x][y + 1] +
          paper[x - 1][y + 1] + paper[x - 1][y]) == 8;
}
int main() {
  std::ios::sync_with_stdio(false);
  std::cin >> n >> m;
  paper.resize(n);
  std::fill(paper.begin(), paper.end(), std::vector<int>(m, 0));
  char c;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      std::cin >> c;
      if (c == '#') {
        paper[i][j] = 1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (paper[i][j] == 1 &&
          !(fits(i - 1, j - 1) || fits(i, j - 1) || fits(i + 1, j - 1) ||
            fits(i + 1, j) || fits(i + 1, j + 1) || fits(i, j + 1) ||
            fits(i - 1, j + 1) || fits(i - 1, j))) {
        std::cout << "NO";
        return 0;
      }
    }
  }
  std::cout << "YES";
  return 0;
}
