#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long n, m;
  cin >> n >> m;
  char mat[n][m], t[n][m];
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      cin >> mat[i][j];
      t[i][j] = '.';
    }
  }
  for (long long i = 0; i <= n - 3; i++) {
    for (long long j = 0; j <= m - 3; j++) {
      long long f1 = 0;
      for (long long a = i; a <= i + 2; a++) {
        for (long long b = j; b <= j + 2; b++) {
          if (!(a - i == 1 && b - j == 1) && mat[a][b] == '.') {
            f1 = 1;
            break;
          }
        }
        if (f1) break;
      }
      if (f1 == 0) {
        for (long long a = i; a <= i + 2; a++) {
          for (long long b = j; b <= j + 2; b++) {
            if (!(a - i == 1 && b - j == 1)) t[a][b] = '#';
          }
        }
      }
    }
  }
  for (long long i = 0; i < n; i++) {
    for (long long j = 0; j < m; j++) {
      if (mat[i][j] != t[i][j]) {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES";
  return 0;
}
