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

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



def check():

    for i in range(h):

        for j in range(w):

            if s[i][j] == '.':

                continue



            def ok(x,y):

                return x>=0 and x<h and y>=0 and y<w and s[x][y]=='#'



            if all([not ok(x,y) for x,y in [(i-1,j), (i+1,j), (i,j+1), (i,j-1)]]) :

                return False

    return True





print(("Yes" if check() else "No"))

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

B = '.'*(w+2)

s = [B]

s.extend(['.' + eval(input()) + '.' for _ in range(h)])

s.append(B)



def check():

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

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

            if s[i][j] == '.':

                continue

            if all([s[x][y]=='.' for x,y in [(i-1,j), (i+1,j), (i,j+1), (i,j-1)]]) :

                return False

    return True



print(("Yes" if check() else "No"))

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


def check():
    for i in range(h):
        for j in range(w):
            if s[i][j] == ".":
                continue

            def ok(x, y):
                return x >= 0 and x < h and y >= 0 and y < w and s[x][y] == "#"

            if all(
                [
                    not ok(x, y)
                    for x, y in [(i - 1, j), (i + 1, j), (i, j + 1), (i, j - 1)]
                ]
            ):
                return False
    return True


print(("Yes" if check() else "No"))

h, w = list(map(int, input().split()))
B = "." * (w + 2)
s = [B]
s.extend(["." + eval(input()) + "." for _ in range(h)])
s.append(B)


def check():
    for i in range(1, h + 1):
        for j in range(1, w + 1):
            if s[i][j] == ".":
                continue
            if all(
                [
                    s[x][y] == "."
                    for x, y in [(i - 1, j), (i + 1, j), (i, j + 1), (i, j - 1)]
                ]
            ):
                return False
    return True


print(("Yes" if check() else "No"))

-s = [eval(input()) for _ in range(h)] +B = "." * (w + 2) +s = [B] +s.extend(["." + eval(input()) + "." for _ in range(h)]) +s.append(B) -    for i in range(h): -        for j in range(w): +    for i in range(1, h + 1): +        for j in range(1, w + 1): - -            def ok(x, y): -                return x >= 0 and x < h and y >= 0 and y < w and s[x][y] == "#" - -                    not ok(x, y) +                    s[x][y] == "."