#include <bits/stdc++.h>
using namespace std;
char a[55][55];
int main() {
  int h, w;
  scanf("%d%d", &h, &w);
  getchar();
  for (int i = 0; i <= h + 1; i++) {
    for (int j = 0; j <= w + 1; j++) {
      if (i == 0 || i == h + 1 || j == 0 || j == w + 1)
        a[i][j] = '.';
      else {
        scanf("%c", &a[i][j]);
      }
    }
    if (i != 0 && i != h + 1) getchar();
  }
  int flag = 1;
  for (int i = 1; i <= h; i++) {
    for (int j = 1; j <= w; j++) {
      if (a[i][j] == '.') continue;
      if (a[i][j - 1] == '.' && a[i][j + 1] == '.' && a[i - 1][j] == '.' &&
          a[i + 1][j] == '.') {
        flag = 0;
        break;
      }
    }
  }
  if (flag == 0)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
