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

sw = [list(str(eval(input()))) for i in range(H)]

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

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



for i in range(H):

  for j in range(W):

    if sw[i][j] == "#":

      counter = 0

      for k in range(4):

        if i+dx[k] < 0 or i+dx[k] >= H or j+dy[k] < 0 or j+dy[k] >= W:

          counter += 1

        elif sw[i+dx[k]][j+dy[k]] == ".":

          counter += 1

      if counter == 4:

        print("No")

        exit()

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

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

X = [1,0,-1,0]

Y = [0,-1,0,1]

for y in range(H):

  for x in range(W):

    check = 0

    if C[y][x] == "#":

      for i in range(4):

        nx = x + X[i]

        ny = y + Y[i]

        if 0 <= nx < W and 0 <= ny < H and C[ny][nx] == "#":

          check = 1

          break

      if check == 0:

        print("No")

        exit()

print("Yes")

      
H, W = list(map(int, input().split()))
sw = [list(str(eval(input()))) for i in range(H)]
dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]
for i in range(H):
    for j in range(W):
        if sw[i][j] == "#":
            counter = 0
            for k in range(4):
                if i + dx[k] < 0 or i + dx[k] >= H or j + dy[k] < 0 or j + dy[k] >= W:
                    counter += 1
                elif sw[i + dx[k]][j + dy[k]] == ".":
                    counter += 1
            if counter == 4:
                print("No")
                exit()
print("Yes")

H, W = list(map(int, input().split()))
C = [list(eval(input())) for i in range(H)]
X = [1, 0, -1, 0]
Y = [0, -1, 0, 1]
for y in range(H):
    for x in range(W):
        check = 0
        if C[y][x] == "#":
            for i in range(4):
                nx = x + X[i]
                ny = y + Y[i]
                if 0 <= nx < W and 0 <= ny < H and C[ny][nx] == "#":
                    check = 1
                    break
            if check == 0:
                print("No")
                exit()
print("Yes")

-sw = [list(str(eval(input()))) for i in range(H)] -dx = [1, 0, -1, 0] -dy = [0, 1, 0, -1] -for i in range(H): -    for j in range(W): -        if sw[i][j] == "#": -            counter = 0 -            for k in range(4): -                if i + dx[k] < 0 or i + dx[k] >= H or j + dy[k] < 0 or j + dy[k] >= W: -                    counter += 1 -                elif sw[i + dx[k]][j + dy[k]] == ".": -                    counter += 1 -            if counter == 4: +C = [list(eval(input())) for i in range(H)] +X = [1, 0, -1, 0] +Y = [0, -1, 0, 1] +for y in range(H): +    for x in range(W): +        check = 0 +        if C[y][x] == "#": +            for i in range(4): +                nx = x + X[i] +                ny = y + Y[i] +                if 0 <= nx < W and 0 <= ny < H and C[ny][nx] == "#": +                    check = 1 +                    break +            if check == 0: