import sys

height, width = list(map(int, input().split()))

array = [0 for i in range(height)]



for i in range(height):

    array[i] = list(eval(input()))



h = [-1, 0,0,1]

w = [ 0,-1,1,0]



for a in range(height):

    for b in range(width):

        if array[a][b] == "#":

            for i in range(4):

                y = a + h[i]

                x = b + w[i]

                if y < 0 or y >= height: continue

                if x < 0 or x >= width: continue

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

                    break

            else:

                print("No")

                sys.exit()

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

S = ["."+eval(input())+"."for i in range(H)]

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

flag=0

for i in range(H):

    for j in range(W):

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

            if S[i-1][j]== "." and S[i+1][j]=="." and S[i][j-1]=="." and S[i][j+1]==".":

                flag=1

print(("Yes" if flag==0 else "No"))
import sys

height, width = list(map(int, input().split()))
array = [0 for i in range(height)]
for i in range(height):
    array[i] = list(eval(input()))
h = [-1, 0, 0, 1]
w = [0, -1, 1, 0]
for a in range(height):
    for b in range(width):
        if array[a][b] == "#":
            for i in range(4):
                y = a + h[i]
                x = b + w[i]
                if y < 0 or y >= height:
                    continue
                if x < 0 or x >= width:
                    continue
                if array[y][x] == "#":
                    break
            else:
                print("No")
                sys.exit()
print("Yes")

H, W = list(map(int, input().split()))
S = ["." + eval(input()) + "." for i in range(H)]
S = ["." * (W + 2)] + S + ["." * (W + 2)]
flag = 0
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            if (
                S[i - 1][j] == "."
                and S[i + 1][j] == "."
                and S[i][j - 1] == "."
                and S[i][j + 1] == "."
            ):
                flag = 1
print(("Yes" if flag == 0 else "No"))

-import sys - -height, width = list(map(int, input().split())) -array = [0 for i in range(height)] -for i in range(height): -    array[i] = list(eval(input())) -h = [-1, 0, 0, 1] -w = [0, -1, 1, 0] -for a in range(height): -    for b in range(width): -        if array[a][b] == "#": -            for i in range(4): -                y = a + h[i] -                x = b + w[i] -                if y < 0 or y >= height: -                    continue -                if x < 0 or x >= width: -                    continue -                if array[y][x] == "#": -                    break -            else: -                print("No") -                sys.exit() -print("Yes") +H, W = list(map(int, input().split())) +S = ["." + eval(input()) + "." for i in range(H)] +S = ["." * (W + 2)] + S + ["." * (W + 2)] +flag = 0 +for i in range(H): +    for j in range(W): +        if S[i][j] == "#": +            if ( +                S[i - 1][j] == "." +                and S[i + 1][j] == "." +                and S[i][j - 1] == "." +                and S[i][j + 1] == "." +            ): +                flag = 1 +print(("Yes" if flag == 0 else "No"))