#include <bits/stdc++.h>
bool isIsolatedBlack(const std::vector<std::vector<int>> &target, int i,
                     int j) {
  if (!target[j][i]) {
    return false;
  }
  if ((i != 0) && target[j][i - 1]) {
    return false;
  }
  if ((j != 0) && target[j - 1][i]) {
    return false;
  }
  if ((i != target[j].size() - 1) && target[j][i + 1]) {
    return false;
  }
  if ((j != target.size() - 1) && target[j + 1][i]) {
    return false;
  }
  return true;
}
bool isItPossibleToDraw(const std::vector<std::vector<int>> &target) {
  for (int j = 0; j < target.size(); ++j) {
    const auto &row = target[j];
    for (int i = 0; i < row.size(); ++i) {
      if (isIsolatedBlack(target, i, j)) {
        return false;
      }
    }
  }
  return true;
}
int main() {
  int h, w;
  std::cin >> h >> w;
  std::vector<std::vector<int>> target(h);
  for (auto &row : target) {
    row.resize(w);
  }
  for (int j = 0; j < h; ++j) {
    std::string row_string;
    std::cin >> row_string;
    auto &row = target[j];
    if (row.size() != row_string.size()) {
      std::cout << "wrong input" << std::endl;
      return -1;
    }
    for (int i = 0; i < row.size(); ++i) {
      if (row_string[i] == '.') {
        row[i] = 0;
      } else {
        row[i] = 1;
      }
    }
  }
  std::cout << (isItPossibleToDraw(target) ? "YES" : "NO") << std::endl;
  return 0;
}
