#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
char s[N][N];
int p[N][N];
int n, m;
void bfs(int x, int y) {
  if (x + 1 > n || y + 1 > m || x + 2 > n || y + 2 > m) return;
  if (s[x + 1][y] == '.' || s[x + 2][y] == '.' || s[x][y + 1] == '.' ||
      s[x][y + 2] == '.' || s[x + 2][y + 1] == '.' || s[x + 2][y + 2] == '.' ||
      s[x + 1][y + 2] == '.')
    return;
  p[x][y] = p[x + 1][y] = p[x + 2][y] = p[x][y + 1] = p[x][y + 2] =
      p[x + 2][y + 1] = p[x + 2][y + 2] = p[x + 1][y + 2] = 1;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) cin >> s[i][j];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '#') bfs(i, j);
    }
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (s[i][j] == '#' && !p[i][j]) {
        cout << "NO" << endl;
        return 0;
      }
    }
  cout << "YES" << endl;
  return 0;
}
