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

s = [[] for i in range(H)]

num = 0

judge = 0

start = []

for i in range(H):

    s[i] = eval(input())

    if '#' in s[i]:

        num += s[i].count('#')



if num == 0:

    print('Yes')

else:

    for y in range(H):

        for x in range(W):

            flag = False

            if s[y][x] == '#':

                for dy, dx in [1, 0], [-1, 0], [0, 1], [0, -1]:

                    if 0 <= y + dy <= H-1 and 0 <= x+dx <= W-1:

                        if s[y+dy][x+dx] != '#':

                            continue

                        else:

                            flag = True

                if flag == True:

                    judge += 1

                    

    if num == judge:

        print('Yes')

    else:

        print('No')      
import sys



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



col = []

col.append('.' * (W + 2))

for i in range(H):

    col.append('.' + eval(input()) + '.')

col.append('.' * (W + 2))



dxdy = [[1, 0], [-1, 0], [0, 1], [0, -1]]





for y in range(1, H + 1):

    for x in range(1, W + 1):

        if col[y][x] == '#':

            for dx, dy in dxdy:

                if col[y + dy][x + dx] == '#':

                    break

            else:

                print('No')

                sys.exit()

print('Yes')
H, W = list(map(int, input().split()))
s = [[] for i in range(H)]
num = 0
judge = 0
start = []
for i in range(H):
    s[i] = eval(input())
    if "#" in s[i]:
        num += s[i].count("#")
if num == 0:
    print("Yes")
else:
    for y in range(H):
        for x in range(W):
            flag = False
            if s[y][x] == "#":
                for dy, dx in [1, 0], [-1, 0], [0, 1], [0, -1]:
                    if 0 <= y + dy <= H - 1 and 0 <= x + dx <= W - 1:
                        if s[y + dy][x + dx] != "#":
                            continue
                        else:
                            flag = True
                if flag == True:
                    judge += 1
    if num == judge:
        print("Yes")
    else:
        print("No")

import sys

H, W = list(map(int, input().split()))
col = []
col.append("." * (W + 2))
for i in range(H):
    col.append("." + eval(input()) + ".")
col.append("." * (W + 2))
dxdy = [[1, 0], [-1, 0], [0, 1], [0, -1]]
for y in range(1, H + 1):
    for x in range(1, W + 1):
        if col[y][x] == "#":
            for dx, dy in dxdy:
                if col[y + dy][x + dx] == "#":
                    break
            else:
                print("No")
                sys.exit()
print("Yes")

+import sys + -s = [[] for i in range(H)] -num = 0 -judge = 0 -start = [] +col = [] +col.append("." * (W + 2)) -    s[i] = eval(input()) -    if "#" in s[i]: -        num += s[i].count("#") -if num == 0: -    print("Yes") -else: -    for y in range(H): -        for x in range(W): -            flag = False -            if s[y][x] == "#": -                for dy, dx in [1, 0], [-1, 0], [0, 1], [0, -1]: -                    if 0 <= y + dy <= H - 1 and 0 <= x + dx <= W - 1: -                        if s[y + dy][x + dx] != "#": -                            continue -                        else: -                            flag = True -                if flag == True: -                    judge += 1 -    if num == judge: -        print("Yes") -    else: -        print("No") +    col.append("." + eval(input()) + ".") +col.append("." * (W + 2)) +dxdy = [[1, 0], [-1, 0], [0, 1], [0, -1]] +for y in range(1, H + 1): +    for x in range(1, W + 1): +        if col[y][x] == "#": +            for dx, dy in dxdy: +                if col[y + dy][x + dx] == "#": +                    break +            else: +                print("No") +                sys.exit() +print("Yes")