#include <bits/stdc++.h>
using namespace std;
int main() {
  int h, w, i, j;
  cin >> h >> w;
  char s[h][w];
  for (i = 0; i < h; i++) {
    for (j = 0; j < w; j++) cin >> s[i][j];
  }
  if (s[0][0] == '.' && s[0][w - 1] == '.' && s[h - 1][0] == '.' &&
      s[h - 1][w - 1] == '.') {
    cout << "Yes" << endl;
  } else
    cout << "No" << endl;
}
