def c_grid_repainting(H, W, Grid):

    is_visited = [[False] * W for h in range(H)]

    delta = [(-1, 0), (1, 0), (0, -1), (0, 1)]  # 上下左右



    def bfs(r, c):

        if Grid[r][c] == '.':

            return

        if is_visited[r][c]:

            return

        q = [(r, c)]

        while q:

            h, w = q.pop()

            for dh, dw in delta:

                nh, nw = h + dh, w + dw

                if 0 <= nh < H and 0 <= nw < W and Grid[nh][nw] == '#' and not is_visited[nh][nw]:

                    is_visited[r][c] = True

                    is_visited[nh][nw] = True

                    q.insert(0, (nh, nw))

    for h in range(H):

        for w in range(W):

            bfs(h, w)

    for h in range(H):

        for w in range(W):

            if Grid[h][w] == '#' and not is_visited[h][w]:

                return 'No'

    return 'Yes'



H,W = [int(i) for i in input().split()]

Grid = [input().strip() for _ in range(H)]

print((c_grid_repainting(H, W, Grid)))
def c_grid_repainting(H, W, Grid):

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

    for h in range(H):

        for w in range(W):

            if Grid[h][w] == '.':  # 白マスは無視

                continue

            black = 0  # マス(h,w)に隣り合った黒マスの数

            for dh, dw in delta:

                is_internal = 0 <= h + dh < H and 0 <= w + dw < W

                if is_internal and Grid[h + dh][w + dw] == '#':

                    # 隣のマスはキャンバスの内部で、黒だった

                    black += 1

            if black == 0:

                # 黒マス候補の隣に黒マスがなかった。そのマスは塗れない

                return 'No'

    return 'Yes'



H,W = [int(i) for i in input().split()]

Grid = [input().strip() for _ in range(H)]

print((c_grid_repainting(H, W, Grid)))
def c_grid_repainting(H, W, Grid):
    is_visited = [[False] * W for h in range(H)]
    delta = [(-1, 0), (1, 0), (0, -1), (0, 1)]  # 上下左右

    def bfs(r, c):
        if Grid[r][c] == ".":
            return
        if is_visited[r][c]:
            return
        q = [(r, c)]
        while q:
            h, w = q.pop()
            for dh, dw in delta:
                nh, nw = h + dh, w + dw
                if (
                    0 <= nh < H
                    and 0 <= nw < W
                    and Grid[nh][nw] == "#"
                    and not is_visited[nh][nw]
                ):
                    is_visited[r][c] = True
                    is_visited[nh][nw] = True
                    q.insert(0, (nh, nw))

    for h in range(H):
        for w in range(W):
            bfs(h, w)
    for h in range(H):
        for w in range(W):
            if Grid[h][w] == "#" and not is_visited[h][w]:
                return "No"
    return "Yes"


H, W = [int(i) for i in input().split()]
Grid = [input().strip() for _ in range(H)]
print((c_grid_repainting(H, W, Grid)))

def c_grid_repainting(H, W, Grid):
    delta = [(-1, 0), (1, 0), (0, -1), (0, 1)]
    for h in range(H):
        for w in range(W):
            if Grid[h][w] == ".":  # 白マスは無視
                continue
            black = 0  # マス(h,w)に隣り合った黒マスの数
            for dh, dw in delta:
                is_internal = 0 <= h + dh < H and 0 <= w + dw < W
                if is_internal and Grid[h + dh][w + dw] == "#":
                    # 隣のマスはキャンバスの内部で、黒だった
                    black += 1
            if black == 0:
                # 黒マス候補の隣に黒マスがなかった。そのマスは塗れない
                return "No"
    return "Yes"


H, W = [int(i) for i in input().split()]
Grid = [input().strip() for _ in range(H)]
print((c_grid_repainting(H, W, Grid)))

-    is_visited = [[False] * W for h in range(H)] -    delta = [(-1, 0), (1, 0), (0, -1), (0, 1)]  # 上下左右 - -    def bfs(r, c): -        if Grid[r][c] == ".": -            return -        if is_visited[r][c]: -            return -        q = [(r, c)] -        while q: -            h, w = q.pop() -            for dh, dw in delta: -                nh, nw = h + dh, w + dw -                if ( -                    0 <= nh < H -                    and 0 <= nw < W -                    and Grid[nh][nw] == "#" -                    and not is_visited[nh][nw] -                ): -                    is_visited[r][c] = True -                    is_visited[nh][nw] = True -                    q.insert(0, (nh, nw)) - +    delta = [(-1, 0), (1, 0), (0, -1), (0, 1)] -            bfs(h, w) -    for h in range(H): -        for w in range(W): -            if Grid[h][w] == "#" and not is_visited[h][w]: +            if Grid[h][w] == ".":  # 白マスは無視 +                continue +            black = 0  # マス(h,w)に隣り合った黒マスの数 +            for dh, dw in delta: +                is_internal = 0 <= h + dh < H and 0 <= w + dw < W +                if is_internal and Grid[h + dh][w + dw] == "#": +                    # 隣のマスはキャンバスの内部で、黒だった +                    black += 1 +            if black == 0: +                # 黒マス候補の隣に黒マスがなかった。そのマスは塗れない