#include <bits/stdc++.h>
using namespace std;
template <class A>
using priority_queue_min = priority_queue<A, vector<A>, greater<A> >;
char a[1009][1009];
long long i, j, k, l, n, m, res;
string s;
bool check(long long i, long long j) {
  return a[i][j] == '#' && a[i + 1][j] == '#' && a[i + 2][j] == '#' &&
         a[i + 2][j + 1] == '#' && a[i + 2][j + 2] == '#' &&
         a[i][j + 1] == '#' && a[i][j + 2] == '#' && a[i + 1][j + 2] == '#';
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(), cout.tie(0);
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    cin >> s;
    for (j = 0; j < m; j++) a[i][j + 1] = s[j];
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      if (a[i][j] == '#') {
        int num = check(i, j) | check(i - 1, j) | check(i - 2, j) |
                  check(i - 2, j - 1) | check(i - 2, j - 2) | check(i, j - 1) |
                  check(i, j - 2) | check(i - 1, j - 2);
        if (num == 0) return cout << "NO" << endl, 0;
      }
    }
  }
  cout << "YES" << endl;
  exit(0);
}
