#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int32_t main() {
  std::ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long t;
  t = 1;
  for (long long tc = 0; tc < t; tc++) {
    long long n, m;
    cin >> n >> m;
    char arr[n][m], brr[n][m];
    for (long long i1 = 0; i1 < n; i1++) {
      for (long long j1 = 0; j1 < m; j1++) {
        cin >> brr[i1][j1];
        arr[i1][j1] = '.';
      }
    }
    for (long long i = 0; i + 2 < n; i++) {
      for (long long j = 0; j + 2 < m; j++) {
        if (brr[i][j] == '#' && brr[i + 1][j] == '#' && brr[i + 2][j] == '#' &&
            brr[i][j + 1] == '#' && brr[i][j + 2] == '#' &&
            brr[i + 2][j + 1] == '#' && brr[i + 1][j + 2] == '#' &&
            brr[i + 2][j + 2] == '#') {
          arr[i][j] = '#';
          arr[i + 1][j] = '#';
          arr[i + 2][j] = '#';
          arr[i][j + 1] = '#';
          arr[i][j + 2] = '#';
          arr[i + 2][j + 1] = '#';
          arr[i + 1][j + 2] = '#';
          arr[i + 2][j + 2] = '#';
        }
      }
    }
    long long cnt = 0;
    for (long long i = 0; i < n; i++) {
      for (long long j = 0; j < m; j++) cnt += (arr[i][j] == brr[i][j]);
    }
    cout << (cnt == n * m ? "YES" : "NO") << "\n";
  }
  return 0;
}
