#include <bits/stdc++.h>
using namespace std;
int sum = 0;
void mul(vector<vector<int>> &a, vector<vector<int>> &b, int i, int j) {
  if (a[i][j] + a[i][j + 1] + a[i][j + 2] + a[i + 2][j] + a[i + 2][j + 1] +
          a[i + 2][j + 2] + a[i + 1][j] + a[i + 1][j + 2] ==
      8) {
    sum -= b[i][j] + b[i][j + 1] + b[i][j + 2] + b[i + 2][j] + b[i + 2][j + 1] +
           b[i + 2][j + 2] + b[i + 1][j] + b[i + 1][j + 2];
    b[i][j] = b[i][j + 1] = b[i][j + 2] = 0;
    b[i + 2][j] = b[i + 2][j + 1] = b[i + 2][j + 2] = 0;
    b[i + 1][j] = b[i + 1][j + 2] = 0;
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<vector<int>> a(n);
  vector<vector<int>> b(n);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      char c;
      cin >> c;
      if (c - '.' == 0) {
        a[i].push_back(0);
        b[i].push_back(0);
      } else {
        a[i].push_back(1);
        b[i].push_back(1);
        sum += 1;
      }
    }
  }
  if (sum == 0) {
    printf("YES\n");
    return 0;
  }
  for (int i = 0; i < n - 2; i++) {
    for (int j = 0; j < m - 2; j++) {
      mul(a, b, i, j);
      if (sum == 0) {
        printf("YES\n");
        return 0;
      }
    }
  }
  printf("NO\n");
  return 0;
}
