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

canvas = [eval(input()) for _ in range(h)]

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

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

clear = True



for y in range(h):

    for x in range(w):

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

            continue

        else:

            count = 0

            for d in range(4):

                dx = x + dx_list[d]

                dy = y + dy_list[d]



                if 0 <= dx <= w-1 and 0 <= dy <= h-1:

                    if canvas[dy][dx] == '#':

                        count += 1



            if count == 0:

                clear = False

                break

    if clear is False:

        break



if clear:

    print('Yes')

else:

    print('No')

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

grid = ['.'*(w+2)]

for _ in range(h):

    line = '.' + eval(input()) + '.'

    grid.append(line)

grid.append('.'*(w+2))



for i in range(1, h+1):

    for j in range(1, w+1):

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

            continue

        else:

            up = grid[i-1][j]

            right = grid[i][j+1]

            left = grid[i][j-1]

            down = grid[i+1][j]



            if up + right + left + down == '....':

                print('No')

                exit()



print('Yes')
h, w = list(map(int, input().split()))
canvas = [eval(input()) for _ in range(h)]
dx_list = [0, 1, 0, -1]
dy_list = [-1, 0, 1, 0]
clear = True
for y in range(h):
    for x in range(w):
        if canvas[y][x] == ".":
            continue
        else:
            count = 0
            for d in range(4):
                dx = x + dx_list[d]
                dy = y + dy_list[d]
                if 0 <= dx <= w - 1 and 0 <= dy <= h - 1:
                    if canvas[dy][dx] == "#":
                        count += 1
            if count == 0:
                clear = False
                break
    if clear is False:
        break
if clear:
    print("Yes")
else:
    print("No")

h, w = list(map(int, input().split()))
grid = ["." * (w + 2)]
for _ in range(h):
    line = "." + eval(input()) + "."
    grid.append(line)
grid.append("." * (w + 2))
for i in range(1, h + 1):
    for j in range(1, w + 1):
        if grid[i][j] == ".":
            continue
        else:
            up = grid[i - 1][j]
            right = grid[i][j + 1]
            left = grid[i][j - 1]
            down = grid[i + 1][j]
            if up + right + left + down == "....":
                print("No")
                exit()
print("Yes")

-canvas = [eval(input()) for _ in range(h)] -dx_list = [0, 1, 0, -1] -dy_list = [-1, 0, 1, 0] -clear = True -for y in range(h): -    for x in range(w): -        if canvas[y][x] == ".": +grid = ["." * (w + 2)] +for _ in range(h): +    line = "." + eval(input()) + "." +    grid.append(line) +grid.append("." * (w + 2)) +for i in range(1, h + 1): +    for j in range(1, w + 1): +        if grid[i][j] == ".": -            count = 0 -            for d in range(4): -                dx = x + dx_list[d] -                dy = y + dy_list[d] -                if 0 <= dx <= w - 1 and 0 <= dy <= h - 1: -                    if canvas[dy][dx] == "#": -                        count += 1 -            if count == 0: -                clear = False -                break -    if clear is False: -        break -if clear: -    print("Yes") -else: -    print("No") +            up = grid[i - 1][j] +            right = grid[i][j + 1] +            left = grid[i][j - 1] +            down = grid[i + 1][j] +            if up + right + left + down == "....": +                print("No") +                exit() +print("Yes")