#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {0, 0, 1, -1};
const int dy[4] = {1, -1, 0, 0};
const int MOD = 1e9 + 7;
int main() {
  int w, h;
  cin >> w >> h;
  int f[52][52] = {0};
  for (int i = 1; i < h + 1; i++) {
    for (int j = 1; j < w + 1; j++) {
      char c;
      cin >> c;
      if (c == '.')
        f[i][j] = 0;
      else
        f[i][j] = 1;
    }
  }
  for (int i = 1; i < h + 1; i++) {
    for (int j = 1; j < w + 1; j++) {
      if (f[i][j] == 1) {
        int sum = 0;
        for (int k = 0; k < (int)(4); k++) {
          sum += f[i + dx[k]][j + dy[k]];
        }
        if (sum == 0) {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
  }
  cout << "YES" << endl;
}
