#include <bits/stdc++.h>
using namespace std;
long long int input(long long int n, vector<long long int> &ve);
long long int input(long long int n, vector<long long int> &ve) {
  long long int val;
  for (long long int i = 0; i < n; i++) {
    cin >> val;
    ve.push_back(val);
  }
  return 0;
}
int main(void) {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, a, m;
  vector<string> st;
  cin >> n >> m;
  string s;
  for (long long int i = 0; i < n; i++) {
    cin >> s;
    st.push_back(s);
  }
  for (long long int i = 1; i < n - 1; i++) {
    for (long long int j = 1; j < m - 1; j++) {
      long long int flag = 0;
      if (st[i - 1][j - 1] == '.' || st[i - 1][j] == '.' ||
          st[i - 1][j + 1] == '.') {
        flag = 1;
      }
      if (flag == 1) {
        continue;
      }
      if (st[i][j - 1] == '.' || st[i][j + 1] == '.') {
        flag = 1;
      }
      if (flag == 1) {
        continue;
      }
      if (st[i + 1][j - 1] == '.' || st[i + 1][j] == '.' ||
          st[i + 1][j + 1] == '.') {
        flag = 1;
      }
      if (flag == 1) {
        continue;
      }
      st[i - 1][j - 1] = 'a', st[i - 1][j] = 'a', st[i - 1][j + 1] = 'a';
      st[i + 1][j - 1] = 'a', st[i + 1][j] = 'a', st[i + 1][j + 1] = 'a';
      st[i][j - 1] = 'a', st[i][j + 1] = 'a';
    }
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = 0; j < m; j++) {
      if (st[i][j] == '#') {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  return 0;
}
