H,W = map(int, input().split())
s = []
answer = "YES"

for i in range(H):
    s.append(str(input()))

for i in range(H):
    for j in range(W):
        if s[i][j] == "#":
            if j-1 >= 0 and s[i][j-1] == ".":
                if j+1 < W and s[i][j+1] == ".":
                    if i-1 >=0 and s[i-1][j] == ".":
                        if i+1 < H and s[i+1][j] == ".":
                            answer ="NO"

print(answer)
