import kotlin.math.max fun main() { val builder = StringBuilder() val (h, w) = readInputLine().split(" ").map { it.toInt() } val map = Array(h) { readInputLine().toCharArray() } var ok = false for (i in 0 until h) { if (ok) { break } for (j in 0 until w) { val tmp = Array(h) { map[it].copyOf() } var ng = false for (k in 0 until h) { if (ng) { break } for (l in 0 until w) { if (tmp[k][l] == '#') { tmp[k][l] = 'r' if (k + i >= h || l + j >= w || tmp[k + i][l + j] != '#') { ng = true break } tmp[k + i][l + j] = 'b' } } } if (!ng) { ok = true break } } } builder.appendln(if (ok) "YES" else "NO") print(builder.toString()) } fun readInputLine(): String { return readLine()!! }