#include <bits/stdc++.h>
using namespace std;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
int main() {
  int n, m;
  cin >> n >> m;
  char a[n + 5][m + 5];
  for (int i = 0; i <= n + 1; i++)
    for (int j = 0; j <= m + 1; j++) a[i][j] = '.';
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) cin >> a[i][j];
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= m; j++) {
      if (a[i + 1][j] == '.' && a[i - 1][j] == '.' && a[i][j + 1] == '.' &&
          a[i][j - 1] == '.') {
        cout << "NO";
        return 0;
      }
    }
  cout << "YES";
  return 0;
}
