h,w = list(map(int,input().split()))

S = [eval(input()) for p in range(h)]



dx = [1,0,-1,0]

dy = [0,1,0,-1]



for i in range(h):

    for j in range(w):

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

            continue

        else:

            count = 0

            for k in range(4):

                    if not 0<=i+dy[k]<h or not 0<=j+dx[k]<w:

                        continue

                    if S[i+dy[k]][j+dx[k]] == '#':

                        count += 1

            if count == 0:

                print('No')

                exit()



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

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

dy = [0,1,0,-1]

dx = [1,0,-1,0]

for y in range(H):

    for x in range(W):

        if S[y][x] == '.':

            continue

        if any(0<=y+dy[i]<H and 0<=x+dx[i]<W and S[y+dy[i]][x+dx[i]] == '#' for i in range(4)):

            continue

        print('No')

        exit()

print('Yes')    
h, w = list(map(int, input().split()))
S = [eval(input()) for p in range(h)]
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
for i in range(h):
    for j in range(w):
        if S[i][j] == ".":
            continue
        else:
            count = 0
            for k in range(4):
                if not 0 <= i + dy[k] < h or not 0 <= j + dx[k] < w:
                    continue
                if S[i + dy[k]][j + dx[k]] == "#":
                    count += 1
            if count == 0:
                print("No")
                exit()
print("Yes")

H, W = list(map(int, input().split()))
S = [eval(input()) for i in range(H)]
dy = [0, 1, 0, -1]
dx = [1, 0, -1, 0]
for y in range(H):
    for x in range(W):
        if S[y][x] == ".":
            continue
        if any(
            0 <= y + dy[i] < H and 0 <= x + dx[i] < W and S[y + dy[i]][x + dx[i]] == "#"
            for i in range(4)
        ):
            continue
        print("No")
        exit()
print("Yes")

-h, w = list(map(int, input().split())) -S = [eval(input()) for p in range(h)] +H, W = list(map(int, input().split())) +S = [eval(input()) for i in range(H)] +dy = [0, 1, 0, -1] -dy = [0, 1, 0, -1] -for i in range(h): -    for j in range(w): -        if S[i][j] == ".": +for y in range(H): +    for x in range(W): +        if S[y][x] == ".": -        else: -            count = 0 -            for k in range(4): -                if not 0 <= i + dy[k] < h or not 0 <= j + dx[k] < w: -                    continue -                if S[i + dy[k]][j + dx[k]] == "#": -                    count += 1 -            if count == 0: -                print("No") -                exit() +        if any( +            0 <= y + dy[i] < H and 0 <= x + dx[i] < W and S[y + dy[i]][x + dx[i]] == "#" +            for i in range(4) +        ): +            continue +        print("No") +        exit()