# Problem C - Grid Repainting



# input process

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

s_list = [[0]*W for i in range(H)]

for i in range(H):

    tmp = eval(input())

    for j in range(W):

        s_list[i][j] = tmp[j]



# search process

is_ok = True

for i in range(H):

    for j in range(W):

        if s_list[i][j]==".":

            continue

        # right process

        if j+1<W:

            if s_list[i][j+1]=="#":

                continue

        # left process

        if j-1>=0:

            if s_list[i][j-1]=="#":

                continue

        # down process

        if i+1<H:

            if s_list[i+1][j]=="#":

                continue

        # up process

        if i-1>=0:

            if s_list[i-1][j]=="#":

                continue

        # stop process

        is_ok = False

        break



if is_ok:

    print("Yes")

else:

    print("No")

# Problem C - Grid Repainting 2



# input

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

board = [[0]*W for i in range(H)]

for i in range(H):

    s_list = list(eval(input()))

    for j in range(W):

        board[i][j] = s_list[j]



# initialization

is_ok = True



# check

for i in range(H):

    for j in range(W):

        s = board[i][j]

        if s=='.':

            continue



        # right

        if j+1<W:

            if s=='#' and board[i][j+1]=='#':

                continue



        # left

        if j-1>=0:

            if s=='#' and board[i][j-1]=='#':

                continue



        # up

        if i-1>=0:

            if s=='#' and board[i-1][j]=='#':

                continue



        # down

        if i+1<H:

            if s=='#' and board[i+1][j]=='#':

                continue



        is_ok = False

        break



# output

if is_ok:

    print("Yes")

else:

    print("No")

# Problem C - Grid Repainting
# input process
H, W = list(map(int, input().split()))
s_list = [[0] * W for i in range(H)]
for i in range(H):
    tmp = eval(input())
    for j in range(W):
        s_list[i][j] = tmp[j]
# search process
is_ok = True
for i in range(H):
    for j in range(W):
        if s_list[i][j] == ".":
            continue
        # right process
        if j + 1 < W:
            if s_list[i][j + 1] == "#":
                continue
        # left process
        if j - 1 >= 0:
            if s_list[i][j - 1] == "#":
                continue
        # down process
        if i + 1 < H:
            if s_list[i + 1][j] == "#":
                continue
        # up process
        if i - 1 >= 0:
            if s_list[i - 1][j] == "#":
                continue
        # stop process
        is_ok = False
        break
if is_ok:
    print("Yes")
else:
    print("No")

# Problem C - Grid Repainting 2
# input
H, W = list(map(int, input().split()))
board = [[0] * W for i in range(H)]
for i in range(H):
    s_list = list(eval(input()))
    for j in range(W):
        board[i][j] = s_list[j]
# initialization
is_ok = True
# check
for i in range(H):
    for j in range(W):
        s = board[i][j]
        if s == ".":
            continue
        # right
        if j + 1 < W:
            if s == "#" and board[i][j + 1] == "#":
                continue
        # left
        if j - 1 >= 0:
            if s == "#" and board[i][j - 1] == "#":
                continue
        # up
        if i - 1 >= 0:
            if s == "#" and board[i - 1][j] == "#":
                continue
        # down
        if i + 1 < H:
            if s == "#" and board[i + 1][j] == "#":
                continue
        is_ok = False
        break
# output
if is_ok:
    print("Yes")
else:
    print("No")

-# Problem C - Grid Repainting -# input process +# Problem C - Grid Repainting 2 +# input -s_list = [[0] * W for i in range(H)] +board = [[0] * W for i in range(H)] -    tmp = eval(input()) +    s_list = list(eval(input())) -        s_list[i][j] = tmp[j] -# search process +        board[i][j] = s_list[j] +# initialization +# check -        if s_list[i][j] == ".": +        s = board[i][j] +        if s == ".": -        # right process +        # right -            if s_list[i][j + 1] == "#": +            if s == "#" and board[i][j + 1] == "#": -        # left process +        # left -            if s_list[i][j - 1] == "#": +            if s == "#" and board[i][j - 1] == "#": -        # down process +        # up +        if i - 1 >= 0: +            if s == "#" and board[i - 1][j] == "#": +                continue +        # down -            if s_list[i + 1][j] == "#": +            if s == "#" and board[i + 1][j] == "#": -        # up process -        if i - 1 >= 0: -            if s_list[i - 1][j] == "#": -                continue -        # stop process +# output