#include <bits/stdc++.h>
using namespace std;
const int OO = 0x3f3f3f3f, MOD = 1000000007;
char grid[1005][1005];
bool vis[1005][1005] = {};
int n, m;
int dirI[] = {-1, -1, -1, 0, 0, 1, 1, 1};
int dirJ[] = {-1, 0, 1, -1, 1, -1, 0, 1};
void check(int i, int j) {
  for (int k = 0; k < 8; k++) {
    vis[i + dirI[k]][j + dirJ[k]] = 1;
  }
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) cin >> grid[i][j];
  for (int i = 1; i < n - 1; i++)
    for (int j = 1; j < m - 1; j++) {
      if (grid[i + 1][j] == '#' && grid[i - 1][j] == '#' &&
          grid[i][j + 1] == '#' && grid[i][j - 1] == '#')
        check(i, j);
    }
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++)
      if (grid[i][j] == '#' && !vis[i][j]) return cout << "NO", 0;
  cout << "YES";
  return 0;
}
