9 5
.....
#....
..#..
.....
.#..#
...#.
.#...
....#
.....
 4 10
..#......#
.....##...
#.........
.#.......#
 50 2
..
..
#.
..
.#
..
..
..
.#
..
..
.#
##
..
..
..
.#
..
..
.#
..
..
.#
..
..
.#
..
.#
..
.#
..
.#
.#
.#
..
..
..
.#
.#
.#
..
..
.#
.#
..
..
..
..
..
..
 2 50
...#.##.###...#.#..##....##..........#.#..#.#####.
...#.##.###...#.#..##....##..........#.#..#.#####.
 1 1
#
 3 3
.##
#.#
##.
 50 8
.....#..
........
........
.....#..
.....#..
........
........
........
........
...#....
...#....
........
...#....
#.#.#...
...#....
...#....
........
...#....
...#....
...#....
........
#.#.#...
.....#..
........
#.#.#...
#.#.#...
#.#.#...
...#....
........
........
........
#.#.#...
........
.....#..
........
........
........
........
........
........
.....#..
........
........
........
.....#..
#.#.#...
...#....
........
........
........
 1 1
.
 25 16
.............#..
.............#..
.......#...#....
............#...
.....#..........
.....#..........
#...............
................
........#.......
................
................
.#..............
#...............
.....#..........
.#..............
............#...
................
................
................
........#.......
..#.............
..........#.....
.......#...#....
.............#..
..........#.....
 25 16
..............#.
................
...#...#........
........#.#.....
..............##
..............#.
.......#........
......#.........
............#...
.........#.....#
..............#.
.......#........
#...........#...
...#.#..........
.#..............
................
......#.....#...
.......#........
........#.....#.
................
......#.........
..#.............
................
...#.#..........
.#..............
 10 15
.......#.......
.....#.........
....#..........
....#..........
.....#.........
.....#.........
#.............#
...#..#........
...............
.............#.
 4 10
###..#..##
...##..#..
.##..#..#.
.........#
 2 5
.####
#..##
 5 2
##
##
..
##
..
 2 2
##
#.
 50 1
.
.
#
.
#
.
#
.
.
#
#
#
.
#
#
#
#
.
.
.
.
.
.
.
.
.
#
#
#
#
.
.
.
.
.
#
.
.
.
#
#
.
.
#
#
.
.
#
#
.
 5 2
#.
##
##
#.
..
 2 3
#.#
###
 2 1
.
#
 2 3
#.#
##.
 10 10
..........
..........
..........
..........
.#.......#
#.........
......#...
..........
..........
#.....#...
 4 4
###.
##.#
#.##
.###

No
 No
 No
 Yes
 Yes
 No
 Yes
 Yes
 Yes
 No
 Yes
 No
 No
 Yes
 No
 Yes
 No
 No
 Yes
 No
 No
 No


/**
 * Date: 21 Mar, 2018
 * Link :
 *
 * @author Prasad-Chaudhari
 * @email prasadc8897@gmail.com
 */

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class New_File_3 {

    public static void main (String[] args) throws java.lang.Exception {
        FastIO2 in = new FastIO2();
        int n = in.ni();
        int m = in.ni();
        boolean[][] b =new boolean[n][m];
        char c[][] = new char[n][m];
        boolean r[] = new boolean[n];
        boolean c1[] = new boolean[m];
        for(int i=0;i<n;i++){
            c[i] = in.next().toCharArray();
        }
        go:
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                if(c[i][j]=='#'){
                    if(r[i]||c1[j]){
                        break go;
                    }
                    // System.out.println("First vertix "+i+" "+j);
                        boolean c2[] = new boolean[m];
                        boolean r2[] = new boolean[n];
                        int count=0;
                        for(int k=j;k<m;k++){
                            if(c[i][k]=='#'){
                                if(c1[k]){
                                    System.out.println("NO");
                                    return;
                                }
                                c2[k]=true;
                                count++;
                            }
                        }
                        int count2=0;
                        for(int k=i;k<n;k++){
                            if(c[k][j]=='#'){
                                if(r[k]){
                                    System.out.println("NO");
                                    return;
                                }
                                r2[k]=true;
                                count2+=count;
                            }
                        }
                        // for(int k=0;k<n;k++){
                        //     if(r2[k])System.out.print(k+" ");
                        // }
                        // System.out.println();
                        // for(int k=0;k<m;k++){
                        //     if(c2[k])System.out.print(k+" ");
                        // }
                        // System.out.println();
                        for(int k=i;k<n;k++){
                            if(r2[k]){
                                for(int l=j;l<m;l++){
                                    if(c2[l]){
                                        if(c[k][l]=='#'){
                                            count2--;
                                        }
                                    }
                                }
                            }
                        }
                        if(count2==0){
                            for(int k=i;k<n;k++){
                                for(int l=j;l<m;l++){
                                    if(r2[k]&&c2[j]){
                                        if(c[k][l]=='#'){
                                            c[k][l]='.';
                                        }
                                    }
                                }
                            }
                            for(int k=0;k<n;k++){
                                if(r2[k]){
                                    r[k]=true;
                                }
                            }
                            for(int k=0;k<m;k++){
                                if(c2[k]){
                                    c1[k]=true;
                                }
                            }
                        }
                        else{
                            System.out.println("NO");
                            return;
                        }
                    }
                }
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<m;j++){
                // System.out.print(c[i][j]);
                if(c[i][j]=='#'){
                    System.out.println("NO");
                    return;
                }
            }
            // System.out.println();
        }
        System.out.println("YES");
    }

    static class FastIO2 {

        private final BufferedReader br;
        private String s[];
        private int index;

        public FastIO2() throws IOException {
            br = new BufferedReader(new InputStreamReader(System.in));
            index = 0;
        }

        public int ni() throws IOException {
            return Integer.parseInt(nextToken());
        }

        public double nd() throws IOException {
            return Double.parseDouble(nextToken());
        }

        public long nl() throws IOException {
            return Long.parseLong(nextToken());
        }

        public String next() throws IOException {
            return nextToken();
        }

        public String nli() throws IOException {
            return br.readLine();
        }

        public int[] gia(int n) throws IOException {
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public int[] gia(int n, int start, int end) throws IOException {
            validate(n, start, end);
            int a[] = new int[n];
            for (int i = start; i < end; i++) {
                a[i] = ni();
            }
            return a;
        }

        public double[] gda(int n) throws IOException {
            double a[] = new double[n];
            for (int i = 0; i < n; i++) {
                a[i] = nd();
            }
            return a;
        }

        public double[] gda(int n, int start, int end) throws IOException {
            validate(n, start, end);
            double a[] = new double[n];
            for (int i = start; i < end; i++) {
                a[i] = nd();
            }
            return a;
        }

        public long[] gla(int n) throws IOException {
            long a[] = new long[n];
            for (int i = 0; i < n; i++) {
                a[i] = ni();
            }
            return a;
        }

        public long[] gla(int n, int start, int end) throws IOException {
            validate(n, start, end);
            long a[] = new long[n];
            for (int i = start; i < end; i++) {
                a[i] = ni();
            }
            return a;
        }

        private String nextToken() throws IndexOutOfBoundsException, IOException {
            if(s == null){
                s = br.readLine().split(" ");
            }
            if (index == s.length) {
                s = br.readLine().split(" ");
                index = 0;
            }
            return s[index++];
        }

        private void validate(int n, int start, int end) {
            if (start < 0 || end >= n) {
                throw new IllegalArgumentException();
            }
        }
    }
}

