#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 5;
char c[maxn][maxn];
bool vis[maxn][maxn];
int n, m;
int dir[8][2] = {{0, 1}, {0, 1}, {1, 0}, {1, 0}, {0, -1}, {0, -1}, {-1, 0}};
bool dfs(int x, int y, int index) {
  if (x > n || y > m) return false;
  if (c[x][y] == '.') return false;
  if (index == 8) return true;
  bool flag;
  if (flag = dfs(x + dir[index][0], y + dir[index][1], index + 1))
    vis[x][y] = true;
  return flag;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++)
      while (scanf("%c", &c[i][j]) && c[i][j] == '\n') {
      }
  bool flag = true;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (c[i][j] == '.') continue;
      if (dfs(i, j, 0)) vis[i][j] = true;
      if (!vis[i][j]) {
        flag = false;
        break;
      }
    }
  if (flag)
    printf("YES\n");
  else
    printf("NO\n");
}
