#include <bits/stdc++.h>
using namespace std;
bool arr[1005][1005] = {0};
int verificare(int i, int j) {
  if (arr[i + 1][j] == 1 && arr[i][j] == 1 && arr[i + 2][j] == 1 &&
      arr[i][j + 1] == 1 && arr[i][j + 2] == 1 && arr[i + 1][j + 2] == 1 &&
      arr[i + 2][j + 2] == 1 && arr[i + 2][j + 1] == 1)
    return 1;
  return 0;
}
int main() {
  int n, m, i, j, k, l;
  cin >> n >> m;
  for (i = 0; i != n; i++) {
    for (j = 0; j != m; j++) {
      char aux;
      cin >> aux;
      if (aux == '#')
        arr[i][j] = 1;
      else
        arr[i][j] = 0;
    }
  }
  for (i = 0; i != n; i++) {
    for (j = 0; j != m; j++) {
      if (arr[i][j] == 1) {
        int ok = 0;
        for (k = 0; k != 3; k++)
          for (l = 0; l != 3; l++) {
            if (k == 1 && l == 1) continue;
            if (verificare(i - k, j - l)) {
              ok = 1;
            }
          }
        if (ok == 1) continue;
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  return 0;
}
