#include <bits/stdc++.h>
using namespace std;
template <class T>
void dbs(string str, T t) {
  cerr << str << " : " << t << "\n";
}
template <class T, class... S>
void dbs(string str, T t, S... s) {
  int idx = str.find(',');
  cerr << str.substr(0, idx) << " : " << t << ",";
  dbs(str.substr(idx + 1), s...);
}
template <class S, class T>
ostream& operator<<(ostream& os, const pair<S, T>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, const set<T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class S, class T>
ostream& operator<<(ostream& os, const map<S, T>& p) {
  os << "[ ";
  for (auto& it : p) os << it << " ";
  return os << "]";
}
template <class T>
void prc(T a, T b) {
  cerr << "[";
  for (T i = a; i != b; ++i) {
    if (i != a) cerr << ", ";
    cerr << *i;
  }
  cerr << "]\n";
}
const int N = 51;
const int M = 51;
vector<string> arr;
int convertA[N + 1][M + 1];
set<string> collection[N + 1];
vector<int> collectionIndice[N + 1];
bool possible() {
  int n = int(arr.size());
  int m = int(arr[0].size());
  for (int i = (int)(0); i <= (int)(n - 1); i++) {
    vector<int> indices;
    string rep;
    for (int j = (int)(0); j <= (int)(m - 1); j++) {
      if (convertA[i][j] == 1) indices.push_back(j);
    }
    sort(indices.begin(), indices.end());
    for (auto indice : indices) {
      rep += to_string(indice);
    }
    for (auto indice : indices) {
      collection[indice].insert(rep);
    }
    for (int k = (int)(0); k <= (int)(int(indices.size()) - 1); k++) {
      for (int k1 = (int)(0); k1 <= (int)(int(indices.size()) - 1); k1++) {
        collectionIndice[indices[k]].push_back(indices[k1]);
      }
    }
  }
  for (int j = (int)(0); j <= (int)(M - 1); j++) {
    for (auto it : collectionIndice[j]) {
      for (auto str : collection[j])
        if (collection[it].find(str) == collection[it].end()) return false;
    }
  }
  return true;
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = (int)(0); i <= (int)(n - 1); i++) {
    string temp;
    cin >> temp;
    arr.push_back(temp);
  }
  for (int i = (int)(0); i <= (int)(n - 1); i++) {
    for (int j = (int)(0); j <= (int)(m - 1); j++) {
      convertA[i][j] = (arr[i][j] == '#') ? 1 : 0;
    }
  }
  if (possible()) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
