raw_input = input().split()[2:]
W = len(raw_input[0])
H = len(raw_input)
added_input = [row + '.' for row in raw_input] + ['.' * len(raw_input[0])]
for y in range(H):
    for x in range(W):
        if added_input[y][x] == '#' and added_input[y+1][x] \
        == added_input[y-1][x] == added_input[y][x+1] == added_input[y][x-1] == '.':
            print('NO')
            break
else:
    print('YES')