from itertools import product

H, W = list(map(int, input().split()))

S = [eval(input()) for _ in range(H)]

can = True

S = ['.' * (W + 2)] + ['.' + s + '.' for s in S] + ['.' * (W + 2)]

S = [list(s) for s in S]

dHW = [[-1, 0], [1, 0], [0, -1], [0, 1]]

for h, w in product(list(range(1, H + 1)), list(range(1, W + 1))):

    if S[h][w] == '#':

        exist = False

        for (dh, dw) in dHW:

            if S[h + dh][w + dw] == '#':

                exist = True

                break

        if exist:

            continue

        else:

            can = False

            break

if can:

    print('Yes')

else:

    print('No')
from itertools import product

H, W = list(map(int, input().split()))

board = [['.'] * W] + [list(eval(input())) for _ in range(H)] + [['.'] * W]

board = [['.'] + b + ['.'] for b in board]

dhw = [[1, 0], [-1, 0], [0, 1], [0, -1]]

for h, w in product(list(range(1, H + 1)), list(range(1, W + 1))):

    if board[h][w] == '#':

        can = False

        for dh, dw in dhw:

            if board[h + dh][w + dw] == '#':

                can = True

                break

        if not can:

            print('No')

            exit()

print('Yes')
from itertools import product

H, W = list(map(int, input().split()))
S = [eval(input()) for _ in range(H)]
can = True
S = ["." * (W + 2)] + ["." + s + "." for s in S] + ["." * (W + 2)]
S = [list(s) for s in S]
dHW = [[-1, 0], [1, 0], [0, -1], [0, 1]]
for h, w in product(list(range(1, H + 1)), list(range(1, W + 1))):
    if S[h][w] == "#":
        exist = False
        for (dh, dw) in dHW:
            if S[h + dh][w + dw] == "#":
                exist = True
                break
        if exist:
            continue
        else:
            can = False
            break
if can:
    print("Yes")
else:
    print("No")

from itertools import product

H, W = list(map(int, input().split()))
board = [["."] * W] + [list(eval(input())) for _ in range(H)] + [["."] * W]
board = [["."] + b + ["."] for b in board]
dhw = [[1, 0], [-1, 0], [0, 1], [0, -1]]
for h, w in product(list(range(1, H + 1)), list(range(1, W + 1))):
    if board[h][w] == "#":
        can = False
        for dh, dw in dhw:
            if board[h + dh][w + dw] == "#":
                can = True
                break
        if not can:
            print("No")
            exit()
print("Yes")

-S = [eval(input()) for _ in range(H)] -can = True -S = ["." * (W + 2)] + ["." + s + "." for s in S] + ["." * (W + 2)] -S = [list(s) for s in S] -dHW = [[-1, 0], [1, 0], [0, -1], [0, 1]] +board = [["."] * W] + [list(eval(input())) for _ in range(H)] + [["."] * W] +board = [["."] + b + ["."] for b in board] +dhw = [[1, 0], [-1, 0], [0, 1], [0, -1]] -    if S[h][w] == "#": -        exist = False -        for (dh, dw) in dHW: -            if S[h + dh][w + dw] == "#": -                exist = True +    if board[h][w] == "#": +        can = False +        for dh, dw in dhw: +            if board[h + dh][w + dw] == "#": +                can = True -        if exist: -            continue -        else: -            can = False -            break -if can: -    print("Yes") -else: -    print("No") +        if not can: +            print("No") +            exit() +print("Yes")