import sys

def main():

    input = sys.stdin.readline

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

    s = [list(input().rstrip()) for _ in range(H)]



    c = lambda i,j: i*W+j

    used = [False] * (H*W+1)

    def dfs(si, sj):

        depth = 0

        stack = [(si, sj, 0)]

        while stack:

            i, j, d = stack.pop()

            for di, dj in [(0,1),(0,-1),(1,0),(-1,0)]:

                ni, nj = i+di, j+dj

                if ni < 0 or ni >= H or nj < 0 or nj >= W: continue

                if s[ni][nj] != '#': continue

                if used[c(ni,nj)]: continue

                used[c(ni,nj)] = True

                stack.append((ni, nj, d+1))

                depth = max(depth, d+1)

        return depth



    for i in range(H):

        for j in range(W):

            if used[c(i,j)] == False and s[i][j] == '#':

                depth = dfs(i,j)

                if depth == 0: return False

    return True



if __name__ == '__main__':

    print(('Yes' if main() else 'No'))
import sys

def main():

    input = sys.stdin.readline

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

    s = [list(input().rstrip()) for _ in range(H)]



    def check(i, j):

        for di, dj in [(0,1),(0,-1),(1,0),(-1,0)]:

            ni, nj = i+di, j+dj

            if ni < 0 or ni >= H or nj < 0 or nj >= W: continue

            if s[ni][nj] == '#': return True

        return False



    for i in range(H):

        for j in range(W):

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

                if check(i,j) == False: return False

    return True



if __name__ == '__main__':

    print(('Yes' if main() else 'No'))
import sys


def main():
    input = sys.stdin.readline
    H, W = list(map(int, input().split()))
    s = [list(input().rstrip()) for _ in range(H)]
    c = lambda i, j: i * W + j
    used = [False] * (H * W + 1)

    def dfs(si, sj):
        depth = 0
        stack = [(si, sj, 0)]
        while stack:
            i, j, d = stack.pop()
            for di, dj in [(0, 1), (0, -1), (1, 0), (-1, 0)]:
                ni, nj = i + di, j + dj
                if ni < 0 or ni >= H or nj < 0 or nj >= W:
                    continue
                if s[ni][nj] != "#":
                    continue
                if used[c(ni, nj)]:
                    continue
                used[c(ni, nj)] = True
                stack.append((ni, nj, d + 1))
                depth = max(depth, d + 1)
        return depth

    for i in range(H):
        for j in range(W):
            if used[c(i, j)] == False and s[i][j] == "#":
                depth = dfs(i, j)
                if depth == 0:
                    return False
    return True


if __name__ == "__main__":
    print(("Yes" if main() else "No"))

import sys


def main():
    input = sys.stdin.readline
    H, W = list(map(int, input().split()))
    s = [list(input().rstrip()) for _ in range(H)]

    def check(i, j):
        for di, dj in [(0, 1), (0, -1), (1, 0), (-1, 0)]:
            ni, nj = i + di, j + dj
            if ni < 0 or ni >= H or nj < 0 or nj >= W:
                continue
            if s[ni][nj] == "#":
                return True
        return False

    for i in range(H):
        for j in range(W):
            if s[i][j] == "#":
                if check(i, j) == False:
                    return False
    return True


if __name__ == "__main__":
    print(("Yes" if main() else "No"))

-    c = lambda i, j: i * W + j -    used = [False] * (H * W + 1) -    def dfs(si, sj): -        depth = 0 -        stack = [(si, sj, 0)] -        while stack: -            i, j, d = stack.pop() -            for di, dj in [(0, 1), (0, -1), (1, 0), (-1, 0)]: -                ni, nj = i + di, j + dj -                if ni < 0 or ni >= H or nj < 0 or nj >= W: -                    continue -                if s[ni][nj] != "#": -                    continue -                if used[c(ni, nj)]: -                    continue -                used[c(ni, nj)] = True -                stack.append((ni, nj, d + 1)) -                depth = max(depth, d + 1) -        return depth +    def check(i, j): +        for di, dj in [(0, 1), (0, -1), (1, 0), (-1, 0)]: +            ni, nj = i + di, j + dj +            if ni < 0 or ni >= H or nj < 0 or nj >= W: +                continue +            if s[ni][nj] == "#": +                return True +        return False -            if used[c(i, j)] == False and s[i][j] == "#": -                depth = dfs(i, j) -                if depth == 0: +            if s[i][j] == "#": +                if check(i, j) == False: