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

M = [[] for _ in range(H)]

for _ in range(H):

    S = eval(input())

    for __ in range(W):

        M[_].append(S[__])



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

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





for i in range(H):

    for j in range(W):

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

            flag = False

            for k in range(4):

                nx = j + dy[k]

                ny = i + dx[k]

                if (nx < 0) or (ny < 0) or (nx >= W) or (ny >= H):

                    continue

                elif M[ny][nx] == '#':

                    flag = True

                    break

            if not flag:

                print('No')

                exit()

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

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



for i in range(H):

    for j in range(W):

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

            for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)):

                ny = i + dy

                nx = j + dx

                if ny < 0 or ny >= H or nx < 0 or nx >= W:

                    continue

                if Map[ny][nx] == '#':

                    break

            else:

                print('No')

                exit()

print('Yes')
H, W = list(map(int, input().split()))
M = [[] for _ in range(H)]
for _ in range(H):
    S = eval(input())
    for __ in range(W):
        M[_].append(S[__])
dx = [-1, 0, 1, 0]
dy = [0, 1, 0, -1]
for i in range(H):
    for j in range(W):
        if M[i][j] == "#":
            flag = False
            for k in range(4):
                nx = j + dy[k]
                ny = i + dx[k]
                if (nx < 0) or (ny < 0) or (nx >= W) or (ny >= H):
                    continue
                elif M[ny][nx] == "#":
                    flag = True
                    break
            if not flag:
                print("No")
                exit()
print("Yes")

H, W = list(map(int, input().split()))
Map = [[s for s in eval(input())] for _ in range(H)]
for i in range(H):
    for j in range(W):
        if Map[i][j] == "#":
            for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)):
                ny = i + dy
                nx = j + dx
                if ny < 0 or ny >= H or nx < 0 or nx >= W:
                    continue
                if Map[ny][nx] == "#":
                    break
            else:
                print("No")
                exit()
print("Yes")

-M = [[] for _ in range(H)] -for _ in range(H): -    S = eval(input()) -    for __ in range(W): -        M[_].append(S[__]) -dx = [-1, 0, 1, 0] -dy = [0, 1, 0, -1] +Map = [[s for s in eval(input())] for _ in range(H)] -        if M[i][j] == "#": -            flag = False -            for k in range(4): -                nx = j + dy[k] -                ny = i + dx[k] -                if (nx < 0) or (ny < 0) or (nx >= W) or (ny >= H): +        if Map[i][j] == "#": +            for dy, dx in ((1, 0), (0, 1), (-1, 0), (0, -1)): +                ny = i + dy +                nx = j + dx +                if ny < 0 or ny >= H or nx < 0 or nx >= W: -                elif M[ny][nx] == "#": -                    flag = True +                if Map[ny][nx] == "#": -            if not flag: +            else: