#include <bits/stdc++.h>
using namespace std;
char a[550][550];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int j = 0; j <= n + 1; j++)
    for (int o = 0; o <= m + 1; o++) a[j][o] = '.';
  for (int j = 1; j <= n; j++)
    for (int o = 1; o <= m; o++) cin >> a[j][o];
  bool OK = true;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (a[i][j] == '#') {
        if (a[i - 1][j] != '#' && a[i + 1][j] != '#' && a[i][j - 1] != '#' &&
            a[i][j + 1] != '#')
          OK = false;
      }
      if (OK == false) break;
    }
  if (OK == true)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
