#include <bits/stdc++.h>
int main() {
  bool check = true;
  int h, k;
  scanf("%d %d", &h, &k);
  int M[h + 2][k + 2];
  for (int i = 0; i < h + 2; i++) {
    for (int j = 0; j < k + 2; j++) {
      M[i][j] = '.';
    }
  }
  char dummy;
  for (int i = 1; i < h + 1; i++) {
    scanf("%c", &dummy);
    for (int j = 1; j < k + 1; j++) {
      scanf("%c", &M[i][j]);
    }
  }
  for (int i = 1; i < h + 1; i++) {
    for (int j = 1; j < k + 1; j++) {
      if (M[i][j] == '#') {
        if (M[i][j - 1] != '#' && M[i][j + 1] != '#' && M[i - 1][j] != '#' &&
            M[i + 1][j] != '#') {
          check = false;
        }
      }
    }
  }
  for (int i = 1; i < h + 1; i++) {
    for (int j = 1; j < k + 1; j++) {
      printf("%c", M[i][j]);
    }
    printf("\n");
  }
  if (check) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
