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

import numpy as np

import sys

grid = np.zeros((H, W))

for h in range(H):

  grid[h,:] = [0 if g == '.' else 1 for g in eval(input())]

  

# print(grid)

for h in range(H):

  for w in range(W):

    if grid[h, w] == 0:

      continue

    

    around = []

    if h > 0:

      around.append(grid[h-1, w])

    if w > 0:

      around.append(grid[h, w-1])

    if h < H-1:

      around.append(grid[h+1, w])

    if w < W-1:

      around.append(grid[h, w+1])

    if 1 in around:

      pass

    else:

      # print(h, w, around)

      print('No')

      sys.exit()

print('Yes')

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

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



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

non_adj = 0

for y in range(h):

    for x in range(w):

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

            continue

        n_adj = 0

        for dx, dy in adj:

            i, j = y+dy, x+dx

            if i < 0 or i >= h or j < 0 or j >= w:

                continue

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

                n_adj += 1

        if n_adj == 0:

            non_adj += 1

# print(non_adj)

if non_adj == 0:

    print('Yes')

else:

    print('No')
H, W = list(map(int, input().split(" ")))
import numpy as np
import sys

grid = np.zeros((H, W))
for h in range(H):
    grid[h, :] = [0 if g == "." else 1 for g in eval(input())]
# print(grid)
for h in range(H):
    for w in range(W):
        if grid[h, w] == 0:
            continue
        around = []
        if h > 0:
            around.append(grid[h - 1, w])
        if w > 0:
            around.append(grid[h, w - 1])
        if h < H - 1:
            around.append(grid[h + 1, w])
        if w < W - 1:
            around.append(grid[h, w + 1])
        if 1 in around:
            pass
        else:
            # print(h, w, around)
            print("No")
            sys.exit()
print("Yes")

h, w = list(map(int, input().split()))
s = [eval(input()) for _ in range(h)]
adj = [(1, 0), (0, 1), (-1, 0), (0, -1)]
non_adj = 0
for y in range(h):
    for x in range(w):
        if s[y][x] == ".":
            continue
        n_adj = 0
        for dx, dy in adj:
            i, j = y + dy, x + dx
            if i < 0 or i >= h or j < 0 or j >= w:
                continue
            if s[i][j] == "#":
                n_adj += 1
        if n_adj == 0:
            non_adj += 1
# print(non_adj)
if non_adj == 0:
    print("Yes")
else:
    print("No")

-H, W = list(map(int, input().split(" "))) -import numpy as np -import sys - -grid = np.zeros((H, W)) -for h in range(H): -    grid[h, :] = [0 if g == "." else 1 for g in eval(input())] -# print(grid) -for h in range(H): -    for w in range(W): -        if grid[h, w] == 0: +h, w = list(map(int, input().split())) +s = [eval(input()) for _ in range(h)] +adj = [(1, 0), (0, 1), (-1, 0), (0, -1)] +non_adj = 0 +for y in range(h): +    for x in range(w): +        if s[y][x] == ".": -        around = [] -        if h > 0: -            around.append(grid[h - 1, w]) -        if w > 0: -            around.append(grid[h, w - 1]) -        if h < H - 1: -            around.append(grid[h + 1, w]) -        if w < W - 1: -            around.append(grid[h, w + 1]) -        if 1 in around: -            pass -        else: -            # print(h, w, around) -            print("No") -            sys.exit() -print("Yes") +        n_adj = 0 +        for dx, dy in adj: +            i, j = y + dy, x + dx +            if i < 0 or i >= h or j < 0 or j >= w: +                continue +            if s[i][j] == "#": +                n_adj += 1 +        if n_adj == 0: +            non_adj += 1 +# print(non_adj) +if non_adj == 0: +    print("Yes") +else: +    print("No")