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

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

for i in range(H):

    for j in range(W):

        if S[i][j]=='.': continue

        if 0<i and S[i-1][j]=='#': continue

        if i<H-1 and S[i+1][j]=='#': continue

        if 0<j and S[i][j-1]=='#': continue

        if j<W-1 and S[i][j+1]=='#': continue

        print('No')

        exit()

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

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



for i in range(H):

    for j in range(W):

        if S[i][j]=='#':

            for ni,nj in ((i+1,j),(i-1,j),(i,j+1),(i,j-1)):

                if 0<=ni<H and 0<=nj<W and S[ni][nj]=='#':

                    break

            else:

                print('No')

                exit()

print('Yes')
H, W = list(map(int, input().split()))
S = [list(eval(input())) for _ in range(H)]
for i in range(H):
    for j in range(W):
        if S[i][j] == ".":
            continue
        if 0 < i and S[i - 1][j] == "#":
            continue
        if i < H - 1 and S[i + 1][j] == "#":
            continue
        if 0 < j and S[i][j - 1] == "#":
            continue
        if j < W - 1 and S[i][j + 1] == "#":
            continue
        print("No")
        exit()
print("Yes")

H, W = list(map(int, input().split()))
S = [eval(input()) for _ in range(H)]
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            for ni, nj in ((i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)):
                if 0 <= ni < H and 0 <= nj < W and S[ni][nj] == "#":
                    break
            else:
                print("No")
                exit()
print("Yes")

-S = [list(eval(input())) for _ in range(H)] +S = [eval(input()) for _ in range(H)] -        if S[i][j] == ".": -            continue -        if 0 < i and S[i - 1][j] == "#": -            continue -        if i < H - 1 and S[i + 1][j] == "#": -            continue -        if 0 < j and S[i][j - 1] == "#": -            continue -        if j < W - 1 and S[i][j + 1] == "#": -            continue -        print("No") -        exit() +        if S[i][j] == "#": +            for ni, nj in ((i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1)): +                if 0 <= ni < H and 0 <= nj < W and S[ni][nj] == "#": +                    break +            else: +                print("No") +                exit()