import strutils, sequtils, math
let hw = stdin.readline.split.map(parseInt)
let (h, w) = (hw[0], hw[1])
var arr: seq[seq[char]] = @[]

for h in 0 ..< h:
  arr.add(@[])
  let bf = stdin.readline
  for w in 0 ..< w: arr[h].add(bf[w])
let rf = arr

for h in 0 ..< h:
  for w in 0 ..< w - 1:
    if rf[h][w] & rf[h][w + 1] == "##":
      for k in 0 ..< 2: arr[h][w + k] = 'o'

for w in 0 ..< w:
  for h in 0 ..< h - 1:
    if rf[h][w] & rf[h + 1][w] == "##":
      for k in 0 ..< 2: arr[h + k][w] = 'o'

for h in 0 ..< h:
  if arr[h].find('#') != -1:
      echo "NO"
      quit()

echo "YES"
