#include <bits/stdc++.h>
using namespace std;
bool case_1(int **m, int ii, int jj) {
  int sum = 0;
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < 3; ++j) {
      sum += m[ii + i][jj + j];
    }
  }
  return (sum == 8 && m[ii + 1][jj + 1] == 0);
}
bool case_2(int **m, int ii, int jj) {
  int sum = 0;
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 4; ++j) {
      sum += m[ii + i][jj + j];
    }
  }
  return (sum == 14 && m[ii][jj] == 0 && m[ii + 3][jj + 3] == 0);
}
bool case_3(int **m, int ii, int jj) {
  int sum = 0;
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 4; ++j) {
      sum += m[ii + i][jj + j];
    }
  }
  return (sum == 14 && m[ii][jj + 3] == 0 && m[ii + 3][jj] == 0);
}
bool case_4(int **m, int ii, int jj) {
  int sum = 0;
  for (int i = 0; i < 3; ++i) {
    for (int j = 0; j < 4; ++j) {
      sum += m[ii + i][jj + j];
    }
  }
  return (sum == 12);
}
bool case_5(int **m, int ii, int jj) {
  int sum = 0;
  for (int i = 0; i < 4; ++i) {
    for (int j = 0; j < 3; ++j) {
      sum += m[ii + i][jj + j];
    }
  }
  return (sum == 12);
}
void mark_as_used(bool **good, int ii, int jj, int delta_i, int delta_j) {
  for (int i = ii; i < ii + delta_i; ++i) {
    for (int j = jj; j < jj + delta_j; ++j) {
      good[i][j] = true;
    }
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  bool **good = new bool *[n];
  int **matrix = new int *[n];
  for (int i = 0; i < n; ++i) {
    good[i] = new bool[m];
    matrix[i] = new int[m];
    for (int j = 0; j < m; ++j) {
      char c;
      cin >> c;
      good[i][j] = false;
      matrix[i][j] = c == '#';
    }
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (i + 2 < n && j + 2 < m && case_1(matrix, i, j)) {
        mark_as_used(good, i, j, 3, 3);
      }
      if (i + 3 < n && j + 3 < m &&
          (case_2(matrix, i, j) || case_3(matrix, i, j))) {
        mark_as_used(good, i, j, 4, 4);
      }
      if (i + 2 < n && j + 3 < m && case_4(matrix, i, j)) {
        mark_as_used(good, i, j, 3, 4);
      }
      if (i + 3 < n && j + 2 < m && case_5(matrix, i, j)) {
        mark_as_used(good, i, j, 4, 3);
      }
    }
  }
  bool answer = true;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < m; ++j) {
      if (matrix[i][j] == 1 && !good[i][j]) {
        answer = false;
      }
    }
  }
  if (answer)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
