import  numpy as np

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

s = [[0]*(w+2)]

for i in range(h):

    s.append([0]+list(eval(input()))+[0])

s.append([0]*(w+2))



t = np.array(s)

c = 0

b = 0



def sirabe(t,i,j):

    if t[i-1][j] != "#" and t[i][j-1] != "#" and t[i+1][j] != "#" and t[i][j+1] != "#":

        return False

    else:

        return True





for i in range(1,h+1):

    for j in range(1,w+1):

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

            if sirabe(t,i,j):

                continue

            else:

                c = 1

                break

    if c == 1:

        break





if c == 0:

    print("Yes")

else:

    print("No")

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

s = [[0]*(w+2)]

for i in range(h):

    s.append([0]+list(eval(input()))+[0])

s.append([0]*(w+2))



c = 0

b = 0



def sirabe(t,i,j):

    if t[i-1][j] != "#" and t[i][j-1] != "#" and t[i+1][j] != "#" and t[i][j+1] != "#":

        return False

    else:

        return True





for i in range(1,h+1):

    for j in range(1,w+1):

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

            if sirabe(s,i,j):

                continue

            else:

                c = 1

                break

    if c == 1:

        break





if c == 0:

    print("Yes")

else:

    print("No")



import numpy as np

h, w = list(map(int, input().split()))
s = [[0] * (w + 2)]
for i in range(h):
    s.append([0] + list(eval(input())) + [0])
s.append([0] * (w + 2))
t = np.array(s)
c = 0
b = 0


def sirabe(t, i, j):
    if (
        t[i - 1][j] != "#"
        and t[i][j - 1] != "#"
        and t[i + 1][j] != "#"
        and t[i][j + 1] != "#"
    ):
        return False
    else:
        return True


for i in range(1, h + 1):
    for j in range(1, w + 1):
        if t[i][j] == "#":
            if sirabe(t, i, j):
                continue
            else:
                c = 1
                break
    if c == 1:
        break
if c == 0:
    print("Yes")
else:
    print("No")

h, w = list(map(int, input().split()))
s = [[0] * (w + 2)]
for i in range(h):
    s.append([0] + list(eval(input())) + [0])
s.append([0] * (w + 2))
c = 0
b = 0


def sirabe(t, i, j):
    if (
        t[i - 1][j] != "#"
        and t[i][j - 1] != "#"
        and t[i + 1][j] != "#"
        and t[i][j + 1] != "#"
    ):
        return False
    else:
        return True


for i in range(1, h + 1):
    for j in range(1, w + 1):
        if s[i][j] == "#":
            if sirabe(s, i, j):
                continue
            else:
                c = 1
                break
    if c == 1:
        break
if c == 0:
    print("Yes")
else:
    print("No")

-import numpy as np - -t = np.array(s) -        if t[i][j] == "#": -            if sirabe(t, i, j): +        if s[i][j] == "#": +            if sirabe(s, i, j):