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