import strutils, sequtils, pegs
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])

proc solve(arr: seq[seq[char]], h, w: int): auto =
  var bf = arr
  for h in 0 ..< h:
    for w in 0 ..< w - 1:
      if replace(bf[h][w] & bf[h][w + 1], peg"\#/o", "") == "":
        for k in 0 ..< 2: bf[h][w + k] = 'o'
  return bf

arr = solve(arr, h, w)
for h in 0 ..< h:
  for w in 0 ..< h: swap(arr[h][w], arr[w][h])
arr = solve(arr, h, w)

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