#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, m, G;
  cin >> n >> m;
  char C[n][m], g[n][m];
  for (int i = 0; i < n; i++) {
    for (int y = 0; y < m; y++) {
      cin >> C[i][y];
      if (C[i][y] == '.') {
        g[i][y] = 1;
      } else {
        g[i][y] = 0;
      }
    }
  }
  for (int i = 1; i < n - 1; i++) {
    for (int y = 1; y < m - 1; y++) {
      G = 1;
      for (int u = 0; u < 3; u++) {
        for (int j = 0; j < 3; j++) {
          if ((u != 1 || j != 1) && C[i + u - 1][y + j - 1] == '.') {
            G = 0;
          }
        }
      }
      if (G == 1) {
        for (int u = 0; u < 3; u++) {
          for (int j = 0; j < 3; j++) {
            if (u != 1 || j != 1) g[i + u - 1][y + j - 1] = 1;
          }
        }
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int y = 0; y < m; y++) {
      if (g[i][y] == 0) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
