#include <bits/stdc++.h>
using namespace std;
int main(void) {
  std::ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  char ch[1005][1005];
  int mark[1005][1005];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      mark[i][j] = 0;
    }
  }
  int f = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cin >> ch[i][j];
      if (ch[i][j] == '#') mark[i][j] = 1;
    }
  }
  for (int i = 1; i < n - 1; i++) {
    for (int j = 1; j < m - 1; j++) {
      if (ch[i][j - 1] == '#' && ch[i][j + 1] == '#' && ch[i - 1][j] == '#' &&
          ch[i - 1][j - 1] == '#' && ch[i - 1][j + 1] == '#' &&
          ch[i + 1][j] == '#' && ch[i + 1][j - 1] == '#' &&
          ch[i + 1][j + 1] == '#') {
        mark[i - 1][j - 1] = 0;
        mark[i - 1][j + 1] = 0;
        mark[i + 1][j] = 0;
        mark[i + 1][j - 1] = 0;
        mark[i + 1][j + 1] = 0;
        mark[i][j - 1] = 0;
        mark[i][j + 1] = 0;
        mark[i - 1][j] = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (mark[i][j] == 1) {
        f = 1;
        break;
      }
    }
  }
  if (f == 1)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
