#include <bits/stdc++.h>
using namespace std;
int a[1005][1005];
bool used[1005][1005];
int n, m;
int get(int i, int j) {
  if (i < 0 || j < 0 || i >= n || j >= m) {
    return -1;
  }
  return a[i][j];
}
int check(int i, int j) {
  int res = get(i, j);
  if (res == -1) return 0;
  if (res == 0) return 0;
  return 1;
}
int tryprint(int i, int j) {
  if (get(i, j) == -1) return 0;
  for (int x = i - 1; x <= i + 1; x++) {
    for (int y = j - 1; y <= j + 1; y++) {
      if (x == i && y == j) continue;
      if (check(x, y) != 1) {
        return 0;
      }
    }
  }
  for (int x = i - 1; x <= i + 1; x++) {
    for (int y = j - 1; y <= j + 1; y++) {
      if (x == i && y == j) continue;
      used[x][y] = true;
    }
  }
  return 1;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    for (int j = 0; j < m; j++) {
      if (s[j] == '.') {
        a[i][j] = 0;
      } else {
        a[i][j] = 1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      if (a[i][j] == 1 && !used[i][j]) {
        bool flag = false;
        for (int x = i - 1; x <= i + 1; x++) {
          for (int y = j - 1; y <= j + 1; y++) {
            if (x == i && y == j) continue;
            if (tryprint(x, y) == 1) {
              flag = true;
              break;
            }
          }
          if (flag) break;
        }
        if (!flag) {
          cout << "NO";
          return 0;
        }
      }
    }
  }
  cout << "YES";
  return 0;
}
