import numpy as np

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

s = np.array([list(eval(input())) for i in range(h)])



infer = []

for i in range(h):

  for j in range(w):

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

      pts = set([

        (max(0, i-1), j), 

        (i, max(0, j-1)), 

        (min(h-1, i+1), j), 

        (i, min(w-1, j+1))

      ])

      check = np.array([ s[ix][iy] for ix, iy in list(pts - set([(i, j)])) ])

      infer.append((check == "#").sum())



print(("No" if 0 in infer else "Yes"))





        

      

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

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



def search(i, j):

  pts = set([ (max(0, i-1), j), (i, max(0, j-1)), 

        (min(h-1, i+1), j), (i, min(w-1, j+1))])

  

  for dh, dw in list(pts):

    if maps[dh][dw] == "#":

      return True

  return False



flag = True

for i in range(h):

  for j in range(w):

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

      if not search(i, j):

        flag = False

        break

        

print(("Yes" if flag else "No"))
import numpy as np

h, w = list(map(int, input().split()))
s = np.array([list(eval(input())) for i in range(h)])
infer = []
for i in range(h):
    for j in range(w):
        if s[i][j] == "#":
            pts = set(
                [
                    (max(0, i - 1), j),
                    (i, max(0, j - 1)),
                    (min(h - 1, i + 1), j),
                    (i, min(w - 1, j + 1)),
                ]
            )
            check = np.array([s[ix][iy] for ix, iy in list(pts - set([(i, j)]))])
            infer.append((check == "#").sum())
print(("No" if 0 in infer else "Yes"))

h, w = list(map(int, input().split()))
maps = [list(eval(input())) for i in range(h)]


def search(i, j):
    pts = set(
        [
            (max(0, i - 1), j),
            (i, max(0, j - 1)),
            (min(h - 1, i + 1), j),
            (i, min(w - 1, j + 1)),
        ]
    )
    for dh, dw in list(pts):
        if maps[dh][dw] == "#":
            return True
    return False


flag = True
for i in range(h):
    for j in range(w):
        if maps[i][j] == "#":
            if not search(i, j):
                flag = False
                break
print(("Yes" if flag else "No"))

-import numpy as np +h, w = list(map(int, input().split())) +maps = [list(eval(input())) for i in range(h)] -h, w = list(map(int, input().split())) -s = np.array([list(eval(input())) for i in range(h)]) -infer = [] + +def search(i, j): +    pts = set( +        [ +            (max(0, i - 1), j), +            (i, max(0, j - 1)), +            (min(h - 1, i + 1), j), +            (i, min(w - 1, j + 1)), +        ] +    ) +    for dh, dw in list(pts): +        if maps[dh][dw] == "#": +            return True +    return False + + +flag = True -        if s[i][j] == "#": -            pts = set( -                [ -                    (max(0, i - 1), j), -                    (i, max(0, j - 1)), -                    (min(h - 1, i + 1), j), -                    (i, min(w - 1, j + 1)), -                ] -            ) -            check = np.array([s[ix][iy] for ix, iy in list(pts - set([(i, j)]))]) -            infer.append((check == "#").sum()) -print(("No" if 0 in infer else "Yes")) +        if maps[i][j] == "#": +            if not search(i, j): +                flag = False +                break +print(("Yes" if flag else "No"))