fun main(args: Array<String>) {

    val (H, W) = readInts()
    val map = Array(H, {it -> Array(W, {it -> false})})

    var prevRow = Array(W, {it -> false}).toMutableList()
    for (i in 0 until H) {
        readLine()!!.map { it == '#' }.let {
            it.forEachIndexed { index, shouldBlack ->
                if (shouldBlack) {
                    if (prevRow[index]) {
                        map[i - 1][index] = true
                        map[i][index] = true
                    }
                    if (index > 0 && it[index -1]) {
                        map[i][index -1] = true
                        map[i][index] = true
                    }
                }
            }
            if (i > 0 && map[i - 1].filterIndexed { idx, isBlack -> prevRow[idx] != isBlack }.isNotEmpty()) {
                println("No")
                return
            }
            prevRow = it.toMutableList()
        }
    }
    if (map[H  - 1].filterIndexed { idx, isBlack -> prevRow[idx] != isBlack }.isNotEmpty()) {
        println("No")
        return
    }

    println("Yes")
}

fun readInts(): List<Int> = readStrings().map { it.toInt() }
fun readStrings(): List<String> = readLine()!!.split(" ")