h, w = map(int, input().split())
grid = [list(input()) for _ in range(h)]

dict = (
    (-1, -1),
    (-1, 0),
    (-1, 1),
    (0, -1),
    (0, 1),
    (1, -1),
    (1, 0),
    (1, 1),
)

achievable = True

for i in range(h):
    for j in range(w):
        count = 0
        now = grid[i][j]
        if now == "#":
            for dy, dx in dict:
                y = i + dy
                x = j + dx
                if y >= 0 and h > y and x >= 0 and w > x:
                    if grid[y][x] == '#':
                        count += 1
            if count == 0:
                achievable = False

print('YES' if achievable else 'No')