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

stage = list(list(eval(input())) for _ in range(H))



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

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

for i in range(H):

    for j in range(W):

        if stage[i][j] == ".":

            continue

        Flag = True

        for k in range(4):

            if 0 <= j + dx[k] < W and 0 <= i + dy[k] < H and stage[i + dy[k]][j + dx[k]] == "#":

                Flag = False

                break

        if Flag:

            print("No")

            exit()

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

canvas = list(list(eval(input())) for _ in range(H))

dx_list = [0, 1, 0, -1]

dy_list = [1, 0, -1, 0]

for x in range(W):

    for y in range(H):

        if canvas[y][x] == ".":

            continue

        is_connect = False

        for dx, dy in zip(dx_list, dy_list):

            if 0 <= x + dx < W and 0 <= y + dy < H:

                if canvas[y + dy][x + dx] == '#':

                    is_connect = True

        if not is_connect:

            print("No")

            exit()

print('Yes')
H, W = list(map(int, input().split()))
stage = list(list(eval(input())) for _ in range(H))
dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]
for i in range(H):
    for j in range(W):
        if stage[i][j] == ".":
            continue
        Flag = True
        for k in range(4):
            if (
                0 <= j + dx[k] < W
                and 0 <= i + dy[k] < H
                and stage[i + dy[k]][j + dx[k]] == "#"
            ):
                Flag = False
                break
        if Flag:
            print("No")
            exit()
print("Yes")

H, W = list(map(int, input().split()))
canvas = list(list(eval(input())) for _ in range(H))
dx_list = [0, 1, 0, -1]
dy_list = [1, 0, -1, 0]
for x in range(W):
    for y in range(H):
        if canvas[y][x] == ".":
            continue
        is_connect = False
        for dx, dy in zip(dx_list, dy_list):
            if 0 <= x + dx < W and 0 <= y + dy < H:
                if canvas[y + dy][x + dx] == "#":
                    is_connect = True
        if not is_connect:
            print("No")
            exit()
print("Yes")

-stage = list(list(eval(input())) for _ in range(H)) -dx = [0, 1, 0, -1] -dy = [1, 0, -1, 0] -for i in range(H): -    for j in range(W): -        if stage[i][j] == ".": +canvas = list(list(eval(input())) for _ in range(H)) +dx_list = [0, 1, 0, -1] +dy_list = [1, 0, -1, 0] +for x in range(W): +    for y in range(H): +        if canvas[y][x] == ".": -        Flag = True -        for k in range(4): -            if ( -                0 <= j + dx[k] < W -                and 0 <= i + dy[k] < H -                and stage[i + dy[k]][j + dx[k]] == "#" -            ): -                Flag = False -                break -        if Flag: +        is_connect = False +        for dx, dy in zip(dx_list, dy_list): +            if 0 <= x + dx < W and 0 <= y + dy < H: +                if canvas[y + dy][x + dx] == "#": +                    is_connect = True +        if not is_connect: