#include <bits/stdc++.h>
using namespace std;
const int N = 2e2 + 5;
int dp[N][N];
int n, m;
int dx[] = {1, 0, -1, 0};
int dy[] = {0, 1, 0, -1};
bool ck(int x, int y) {
  for (int i = 0; i < 4; i++) {
    int nx = x + dx[i];
    int ny = y + dy[i];
    if (dp[nx][ny]) return true;
  }
  return false;
}
bool ck1(int x, int y) {
  for (int i = 1; i <= m; i++) {
    if (dp[x][i] != dp[y][i]) {
      return false;
    }
  }
  return true;
}
bool ck2(int x, int y) {
  for (int i = 1; i <= m; i++) {
    if (dp[x][i] and dp[y][i]) {
      return false;
    }
  }
  return true;
}
int main() {
  cin >> n >> m;
  string s[n];
  for (int i = 0; i < n; i++) {
    cin >> s[i];
    for (int j = 1; j <= m; j++) {
      if (s[i][j - 1] == '.')
        dp[i + 1][j] = 0;
      else
        dp[i + 1][j] = 1;
    }
  }
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      if (!ck1(i, j) and !ck2(i, j)) {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  return 0;
}
