#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int vis[n][m];
  char a[n][m];
  int add[8][2] = {{0, 0}, {1, 0}, {2, 0}, {0, 1},
                   {2, 1}, {0, 2}, {1, 2}, {2, 2}};
  int flag = 1;
  for (int i = 0; i < n; i++) {
    string line;
    cin >> line;
    for (int j = 0; j < m; j++) {
      a[i][j] = line[j];
      vis[i][j] = 0;
    }
  }
  for (int i = 0; i < n - 2; i++) {
    for (int j = 0; j < m - 2; j++) {
      int flag1 = 1;
      if (a[i][j] == '#') {
        for (int k = 0; k < 8; k++)
          if (a[i + add[k][0]][j + add[k][1]] != '#') {
            flag1 = 0;
          }
        if (flag1)
          for (int k = 0; k < 8; k++) vis[i + add[k][0]][j + add[k][1]] = 1;
      }
    }
  }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      if (!vis[i][j] && a[i][j] == '#') flag = 0;
    }
  if (flag == 1)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
