#include <bits/stdc++.h>
using namespace std;
bool mat[1001][1001];
bool vis[1001][1001];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      char x;
      cin >> x;
      mat[i][j] = (x == '#');
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      bool fill = true;
      if (i + 2 <= n && j + 2 <= m) {
        for (int k = i; k <= i + 2 && fill; k++)
          if (mat[k][j] == false) {
            fill = false;
            break;
          }
        for (int k = j; k <= j + 2 && fill; k++)
          if (mat[i][k] == false) {
            fill = false;
            break;
          }
        for (int k = i; k <= i + 2 && fill; k++)
          if (mat[k][j + 2] == false) {
            fill = false;
            break;
          }
        for (int k = j; k <= j + 2 && fill; k++)
          if (mat[i + 2][k] == false) {
            fill = false;
            break;
          }
        if (fill == false) continue;
        for (int k = i; k <= i + 2; k++) vis[k][j] = true;
        for (int k = j; k <= j + 2; k++) vis[i][k] = true;
        for (int k = i; k <= i + 2; k++) vis[k][j + 2] = true;
        for (int k = j; k <= j + 2; k++) vis[i + 2][k] = true;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (mat[i][j] && !vis[i][j]) return cout << "NO" << endl, 0;
    }
  }
  cout << "YES" << endl;
}
