#include <bits/stdc++.h>
using ul = std::uint32_t;
using li = std::int32_t;
using ull = std::uint64_t;
using ll = std::int64_t;
using vul = std::vector<ul>;
using vb = std::vector<bool>;
using vvb = std::vector<vb>;
using vvvb = std::vector<vvb>;
std::mt19937_64 rands;
ul n, m;
vvb data(1002, vb(1002, false));
class vec {
 public:
  ul x = 0;
  ul y = 0;
  vec(ul a, ul b) : x(a), y(b) {}
  vec() = default;
};
const std::vector<vec> vecs = {vec(1, 0),  vec(1, 1),   vec(0, 1),  vec(-1, 1),
                               vec(-1, 0), vec(-1, -1), vec(0, -1), vec(1, -1)};
vec operator+(const vec& a, const vec& b) { return vec(a.x + b.x, a.y + b.y); }
int main() {
  std::ios::sync_with_stdio(false);
  std::cin.tie(0);
  rands.seed(std::time(0));
  std::cin >> n >> m;
  for (ul i = 1; i <= n; ++i) {
    for (ul j = 1; j <= m; ++j) {
      char ch;
      std::cin >> ch;
      data[i][j] = ch == '#';
    }
  }
  for (ul i = 1; i <= n; ++i) {
    for (ul j = 1; j <= m; ++j) {
      vec center(i, j);
      if (!data[i][j]) {
        continue;
      }
      bool flag = false;
      for (const vec& u : vecs) {
        bool flag2 = true;
        vec pencenter = center + u;
        for (const vec& v : vecs) {
          vec p = pencenter + v;
          if (!data[p.x][p.y]) {
            flag2 = false;
            break;
          }
        }
        if (flag2) {
          flag = true;
          break;
        }
      }
      if (!flag) {
        std::cout << "NO" << std::endl;
        return 0;
      }
    }
  }
  std::cout << "YES" << std::endl;
  return 0;
}
