#include <bits/stdc++.h>
using namespace std;
const long long N = 1e3 + 10;
const long long LG = 32;
const long long MOD = 1e9 + 7;
long long n, m;
string t[N];
bool check(long long, long long);
bool is_val(long long, long long);
int32_t main() {
  cin >> n >> m;
  for (long long i = 0; i < n; i++) cin >> t[i];
  for (long long i = 0; i < n; i++)
    for (long long j = 0; j < m; j++)
      if (t[i][j] == '#' && (!check(i, j))) {
        cout << "NO" << endl;
        return 0;
      }
  cout << "YES" << endl;
}
bool check(long long x, long long y) {
  for (long long i = -2; i < 1; i++)
    for (long long j = -2; j < 1; j++)
      if (i == -1 && j == -1)
        continue;
      else {
        if (is_val(x + i, y + j)) return true;
      }
  return false;
}
bool is_val(long long x, long long y) {
  if (x < 0 || y < 0 || x + 3 > n || y + 3 > m) return false;
  for (long long i = 0; i < 3; i++)
    for (long long j = 0; j < 3; j++)
      if (i == 1 && j == 1)
        continue;
      else {
        if (t[x + i][y + j] == '.') return false;
      }
  return true;
}
