#include <bits/stdc++.h>
using namespace std;
int main() {
  int H, W;
  cin >> H >> W;
  char v[H + 2][W + 2];
  string vec[W];
  for (int i = 0; i < W; i++) {
    cin >> vec[i];
  }
  for (int i = 0; i < H + 2; i++) {
    for (int j = 0; j < W + 2; j++) {
      if (i == 0 || j == 0 || i == H + 1 || j == W + 1) {
        v[i][j] = '#';
      } else {
        v[i][j] = vec[i - 1][j - 1];
      }
    }
  }
  bool can = true;
  for (int i = 1; i < H + 1; i++) {
    for (int j = 1; j < W + 1; j++) {
      if (v[i][j] == '#') {
        if ((v[i][j] != v[i - 1][j]) && (v[i][j] != v[i + 1][j]) &&
            (v[i][j] != v[i][j - 1]) && (v[i][j] != v[i][j + 1])) {
          can = false;
          break;
        }
      }
    }
  }
  if (can)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
