h, w = list(map(int, input().split()))
s = [input() for _ in range(h)]
move = [(-1, 0), (1, 0), (0, -1), (0, 1)]
flag = 1
for i in range(h):
    for j in range(w):
        hantei = []
        if s[i][j] == "#":
            for dx, dy in move:
                if i+dx<0 or j+dy<0 or i+dx>h-1 or j+dy>w-1:
                    continue
                else:
                    hantei.append(s[i+dx][j+dy])
            if "#" not in hantei:
                flag = 0
                break

if flag:
    print("YES")
else:
    print("NO")