#include <bits/stdc++.h>
using namespace std;
class UnionFind {
 private:
  vector<int> p, rank, setSize;
  int numSets;

 public:
  UnionFind(int N) {
    setSize.assign(N, 1);
    numSets = N;
    rank.assign(N, 0);
    p.assign(N, 0);
    for (int i = 0; i < N; i++) p[i] = i;
  }
  int findSet(int i) { return (p[i] == i) ? i : (p[i] = findSet(p[i])); }
  bool isSameSet(int i, int j) { return findSet(i) == findSet(j); }
  void unionSet(int i, int j) {
    if (!isSameSet(i, j)) {
      numSets--;
      int x = findSet(i), y = findSet(j);
      if (rank[x] > rank[y]) {
        p[y] = x;
        setSize[x] += setSize[y];
      } else {
        p[x] = y;
        setSize[y] += setSize[x];
        if (rank[x] == rank[y]) rank[y]++;
      }
    }
  }
  int numDisjointSets() { return numSets; }
  int sizeOfSet(int i) { return setSize[findSet(i)]; }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, i, j, k, last;
  cin >> n >> m;
  vector<string> s(n);
  UnionFind uf(n + m);
  for (i = 0; i < n; i++) {
    cin >> s[i];
    last = -1;
    for (j = 0; j < m; j++) {
      if (s[i][j] == '#') {
        uf.unionSet(i, j + n);
        if (last == -1)
          last = j;
        else
          uf.unionSet(last + n, j + n);
      }
    }
  }
  bool valid = true;
  for (i = 0; i < n; i++) {
    for (j = 0; j < m; j++) {
      if ((s[i][j] == '.') && (uf.isSameSet(i, j + n))) valid = false;
    }
  }
  if (valid)
    cout << "YES\n";
  else
    cout << "NO\n";
  return 0;
}
