#include <bits/stdc++.h>
using namespace std;
int n, m;
char x[1005][1005];
bool p[1005][1005];
bool pos(int i, int j) {
  if (i + 3 > n || j + 3 > m) return 0;
  for (int(k) = 0; (k) < 3; (k)++) {
    if (x[i][j + k] != '#' || x[i + 2][j + k] != '#') return 0;
  }
  if (x[i + 1][j] != '#' || x[i + 1][j + 2] != '#') return 0;
  return 1;
}
void solve(int test) {
  cin >> n >> m;
  for (int(i) = 0; (i) < n; (i)++) {
    for (int(j) = 0; (j) < m; (j)++) {
      cin >> x[i][j];
    }
  }
  for (int(i) = 0; (i) < n; (i)++) {
    for (int(j) = 0; (j) < m; (j)++) {
      if (pos(i, j)) {
        for (int(a) = 0; (a) < 3; (a)++) {
          for (int(b) = 0; (b) < 3; (b)++) {
            if (a != 1 || b != 1) p[i + a][j + b] = 1;
          }
        }
      }
    }
  }
  for (int(i) = 0; (i) < n; (i)++)
    for (int(j) = 0; (j) < m; (j)++) {
      if (x[i][j] == '#' && p[i][j] == 0) {
        cout << "NO";
        return;
      }
    }
  cout << "YES";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int test = 1;
  for (int(i) = 0; (i) < test; (i)++) {
    solve(i + 1);
  }
  return 0;
}
