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

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



for y in range(H):

    for x in range(W):

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

            f = 1

            if y+1 < H:

                if S[y+1][x] == "#":

                    f = 0

            if x+1 < W:

                if S[y][x+1] == "#":

                    f = 0

            if 0 <= y-1:

                if S[y-1][x] == "#":

                    f = 0

            if 0 <= x-1:

                if S[y][x-1] == "#":

                    f = 0

            if f:

                print("No")

                exit(0)



print("Yes")

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

G = ["."*(W+2)]

for k in range(H):

    G.append("."+eval(input())+".")

G.append("."*(W+2))

for k in range(1,H+1):

    for l in range(1,W+1):

        if G[k][l] == "#":

            if G[k+1][l] == "." and G[k-1][l] == "." and G[k][l-1] == "." and G[k][l+1] == ".":

                print("No")

                exit(0)

print("Yes")

H, W = list(map(int, input().split()))
S = [eval(input()) for k in range(H)]
for y in range(H):
    for x in range(W):
        if S[y][x] == "#":
            f = 1
            if y + 1 < H:
                if S[y + 1][x] == "#":
                    f = 0
            if x + 1 < W:
                if S[y][x + 1] == "#":
                    f = 0
            if 0 <= y - 1:
                if S[y - 1][x] == "#":
                    f = 0
            if 0 <= x - 1:
                if S[y][x - 1] == "#":
                    f = 0
            if f:
                print("No")
                exit(0)
print("Yes")

H, W = list(map(int, input().split()))
G = ["." * (W + 2)]
for k in range(H):
    G.append("." + eval(input()) + ".")
G.append("." * (W + 2))
for k in range(1, H + 1):
    for l in range(1, W + 1):
        if G[k][l] == "#":
            if (
                G[k + 1][l] == "."
                and G[k - 1][l] == "."
                and G[k][l - 1] == "."
                and G[k][l + 1] == "."
            ):
                print("No")
                exit(0)
print("Yes")

-S = [eval(input()) for k in range(H)] -for y in range(H): -    for x in range(W): -        if S[y][x] == "#": -            f = 1 -            if y + 1 < H: -                if S[y + 1][x] == "#": -                    f = 0 -            if x + 1 < W: -                if S[y][x + 1] == "#": -                    f = 0 -            if 0 <= y - 1: -                if S[y - 1][x] == "#": -                    f = 0 -            if 0 <= x - 1: -                if S[y][x - 1] == "#": -                    f = 0 -            if f: +G = ["." * (W + 2)] +for k in range(H): +    G.append("." + eval(input()) + ".") +G.append("." * (W + 2)) +for k in range(1, H + 1): +    for l in range(1, W + 1): +        if G[k][l] == "#": +            if ( +                G[k + 1][l] == "." +                and G[k - 1][l] == "." +                and G[k][l - 1] == "." +                and G[k][l + 1] == "." +            ):