def main():

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

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

    delta = [[0, 1], [1, 0], [0, -1], [-1, 0]]

    black_count = 0

    for i in range(h):

        for j in range(w):

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

                black_count += 1

                tmp = 0

                for dy, dx in delta:

                    new_y = dy + i

                    new_x = dx + j

                    if 0 <= new_y < h and 0 <= new_x < w:

                        if s[new_y][new_x] == "#":

                            tmp += 1

                if tmp > 0:

                    black_count -= 1

    print(("Yes" if black_count == 0 else "No"))





if __name__ == '__main__':

    main()



def main():

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

    s = [["." for _ in range(w + 2)]]

    for _ in range(h):

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

    s.append(s[0])

    delta = [[0, 1], [1, 0], [0, -1], [-1, 0]]

    count_black = 0

    count_possible = 0

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

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

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

                count_black += 1

                if any(s[dy + i][dx + j] == "#" for dy, dx in delta):

                    count_possible += 1

    print(("Yes" if count_possible == count_black else "No"))





if __name__ == '__main__':

    main()



def main():
    h, w = list(map(int, input().split()))
    s = [list(eval(input())) for _ in range(h)]
    delta = [[0, 1], [1, 0], [0, -1], [-1, 0]]
    black_count = 0
    for i in range(h):
        for j in range(w):
            if s[i][j] == "#":
                black_count += 1
                tmp = 0
                for dy, dx in delta:
                    new_y = dy + i
                    new_x = dx + j
                    if 0 <= new_y < h and 0 <= new_x < w:
                        if s[new_y][new_x] == "#":
                            tmp += 1
                if tmp > 0:
                    black_count -= 1
    print(("Yes" if black_count == 0 else "No"))


if __name__ == "__main__":
    main()

def main():
    h, w = list(map(int, input().split()))
    s = [["." for _ in range(w + 2)]]
    for _ in range(h):
        s.append(["."] + list(eval(input())) + ["."])
    s.append(s[0])
    delta = [[0, 1], [1, 0], [0, -1], [-1, 0]]
    count_black = 0
    count_possible = 0
    for i in range(1, h + 1):
        for j in range(1, w + 1):
            if s[i][j] == "#":
                count_black += 1
                if any(s[dy + i][dx + j] == "#" for dy, dx in delta):
                    count_possible += 1
    print(("Yes" if count_possible == count_black else "No"))


if __name__ == "__main__":
    main()

-    s = [list(eval(input())) for _ in range(h)] +    s = [["." for _ in range(w + 2)]] +    for _ in range(h): +        s.append(["."] + list(eval(input())) + ["."]) +    s.append(s[0]) -    black_count = 0 -    for i in range(h): -        for j in range(w): +    count_black = 0 +    count_possible = 0 +    for i in range(1, h + 1): +        for j in range(1, w + 1): -                black_count += 1 -                tmp = 0 -                for dy, dx in delta: -                    new_y = dy + i -                    new_x = dx + j -                    if 0 <= new_y < h and 0 <= new_x < w: -                        if s[new_y][new_x] == "#": -                            tmp += 1 -                if tmp > 0: -                    black_count -= 1 -    print(("Yes" if black_count == 0 else "No")) +                count_black += 1 +                if any(s[dy + i][dx + j] == "#" for dy, dx in delta): +                    count_possible += 1 +    print(("Yes" if count_possible == count_black else "No"))