import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = println(solve(new Scanner(System.in)))

  def solve(in: String): String = solve(new Scanner(in))

  def solve(sc: Scanner): String = {
    val H = sc.nextInt
    val W = sc.nextInt
    val S = Array.fill(H)(sc.next.toCharArray)

    for (h <- 0 until H; w <- 0 until W) {
      if (S(h)(w) == '#') {
        if (!Array((-1, 0), (1, 0), (0, -1), (0, 1)).exists { case (dh, dw) =>
          h + dh >= 0 && h + dh < H && w + dw >= 0 && w + dw < W && S(h + dh)(w + dw) == '#'
        }) {
          return "NO"
        }
      }
    }
    "YES"
  }
}
