#include <bits/stdc++.h>
using namespace std;
int n, m;
bool check(int x, int y, vector<string> &a, vector<vector<int> > &pool) {
  if (x > 0 && y < m - 1 && x < n - 1 && y > 0)
    for (int i = -1; i <= 1; i++)
      for (int j = -1; j <= 1; j++) {
        if (a[i + x][j + y] == '.' && (i != 0 || j != 0)) return false;
      }
  else
    return false;
  return true;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  vector<string> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<vector<int> > pool(n, vector<int>(m));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (check(i, j, a, pool)) {
        for (int i2 = -1; i2 <= 1; i2++)
          for (int j2 = -1; j2 <= 1; j2++) {
            if (i2 != 0 || j2 != 0) pool[i2 + i][j2 + j] = 1;
          }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++)
      if (pool[i][j] == 0 && a[i][j] == '#') {
        cout << "NO";
        return 0;
      }
  }
  cout << "YES";
  return 0;
}
