import numpy as np



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

hw = [eval(input()) for i in range(h)]



isPaintable = [[1]*w for _ in range(h)]



predList = [[0,1],[0,-1],[1,0],[-1,0]]



for i in range(h):

  for j in range(w):

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

      for x, y in predList:

        if i+y in range(h) and j+x in range(w):

#          print(hw[i][j],hw[i+y][j+x],i,j,y,x)

          if hw[i+y][j+x]=="#":

            isPaintable[i][j] = 0

            break

    elif hw[i][j] == ".":

      isPaintable[i][j] = 0



if np.array(isPaintable).sum() == 0:

  print("Yes")

else:

  print("No")

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

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

drc = [[0,1],[0,-1],[1,0],[-1,0]]

for i in range(h):

  for j in range(w):

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

      if all([S[i+y][j+x] == "." for x, y in drc if (0 <= j+x < w) and (0 <= i+y < h)]):

        print("No")

        exit()

print("Yes")
import numpy as np

h, w = list(map(int, input().split()))
hw = [eval(input()) for i in range(h)]
isPaintable = [[1] * w for _ in range(h)]
predList = [[0, 1], [0, -1], [1, 0], [-1, 0]]
for i in range(h):
    for j in range(w):
        if hw[i][j] == "#":
            for x, y in predList:
                if i + y in range(h) and j + x in range(w):
                    #          print(hw[i][j],hw[i+y][j+x],i,j,y,x)
                    if hw[i + y][j + x] == "#":
                        isPaintable[i][j] = 0
                        break
        elif hw[i][j] == ".":
            isPaintable[i][j] = 0
if np.array(isPaintable).sum() == 0:
    print("Yes")
else:
    print("No")

h, w = list(map(int, input().split()))
S = [list(eval(input())) for _ in range(h)]
drc = [[0, 1], [0, -1], [1, 0], [-1, 0]]
for i in range(h):
    for j in range(w):
        if S[i][j] == "#":
            if all(
                [
                    S[i + y][j + x] == "."
                    for x, y in drc
                    if (0 <= j + x < w) and (0 <= i + y < h)
                ]
            ):
                print("No")
                exit()
print("Yes")

-import numpy as np - -hw = [eval(input()) for i in range(h)] -isPaintable = [[1] * w for _ in range(h)] -predList = [[0, 1], [0, -1], [1, 0], [-1, 0]] +S = [list(eval(input())) for _ in range(h)] +drc = [[0, 1], [0, -1], [1, 0], [-1, 0]] -        if hw[i][j] == "#": -            for x, y in predList: -                if i + y in range(h) and j + x in range(w): -                    #          print(hw[i][j],hw[i+y][j+x],i,j,y,x) -                    if hw[i + y][j + x] == "#": -                        isPaintable[i][j] = 0 -                        break -        elif hw[i][j] == ".": -            isPaintable[i][j] = 0 -if np.array(isPaintable).sum() == 0: -    print("Yes") -else: -    print("No") +        if S[i][j] == "#": +            if all( +                [ +                    S[i + y][j + x] == "." +                    for x, y in drc +                    if (0 <= j + x < w) and (0 <= i + y < h) +                ] +            ): +                print("No") +                exit() +print("Yes")