import sys

sys.setrecursionlimit(100000)

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

lst = []

for i in range(h):

  lst.append([s for s in eval(input())])

def dfs(x,y):

  if lst[x][y] == '#':

    lst[x][y] = '.'

    if x + 1 <= h - 1:

      dfs(x + 1,y)

    if x - 1 >= 0:

      dfs(x - 1,y)

    if y + 1 <= w - 1:

      dfs(x, y + 1)

    if y - 1 >= 0:

      dfs(x,y - 1)

flag = True

for i in range(h):

  for j in range(w):

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

      if (i - 1 >= 0 and lst[i - 1][j] == "#") or (i + 1 < h and lst[i + 1][j] == "#") or (j - 1 >= 0 and lst[i][j - 1] == "#") or (j + 1 < w and lst[i][j + 1] == "#"):

        dfs(i,j)

      else:

        flag = False

        break

if flag:

  print("Yes")

else:

  print("No")

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

lst = ["." * (w + 2)]

for _ in range(h):

  s = eval(input())

  s = "." + s + "."

  lst.append(s)

lst.append("." * (w + 2))



flag = True



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

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

    if lst[x][y] == "#":

      if lst[x - 1][y] == "." and lst[x + 1][y] == "." and lst[x][y + 1] == "." and lst[x][y - 1] == ".":

        flag = False

        break



if flag:

  print("Yes")

else:

  print("No")



import sys

sys.setrecursionlimit(100000)
h, w = list(map(int, input().split()))
lst = []
for i in range(h):
    lst.append([s for s in eval(input())])


def dfs(x, y):
    if lst[x][y] == "#":
        lst[x][y] = "."
        if x + 1 <= h - 1:
            dfs(x + 1, y)
        if x - 1 >= 0:
            dfs(x - 1, y)
        if y + 1 <= w - 1:
            dfs(x, y + 1)
        if y - 1 >= 0:
            dfs(x, y - 1)


flag = True
for i in range(h):
    for j in range(w):
        if lst[i][j] == "#":
            if (
                (i - 1 >= 0 and lst[i - 1][j] == "#")
                or (i + 1 < h and lst[i + 1][j] == "#")
                or (j - 1 >= 0 and lst[i][j - 1] == "#")
                or (j + 1 < w and lst[i][j + 1] == "#")
            ):
                dfs(i, j)
            else:
                flag = False
                break
if flag:
    print("Yes")
else:
    print("No")

h, w = list(map(int, input().split()))
lst = ["." * (w + 2)]
for _ in range(h):
    s = eval(input())
    s = "." + s + "."
    lst.append(s)
lst.append("." * (w + 2))
flag = True
for x in range(1, h + 1):
    for y in range(1, w + 1):
        if lst[x][y] == "#":
            if (
                lst[x - 1][y] == "."
                and lst[x + 1][y] == "."
                and lst[x][y + 1] == "."
                and lst[x][y - 1] == "."
            ):
                flag = False
                break
if flag:
    print("Yes")
else:
    print("No")

-import sys - -sys.setrecursionlimit(100000) -lst = [] -for i in range(h): -    lst.append([s for s in eval(input())]) - - -def dfs(x, y): -    if lst[x][y] == "#": -        lst[x][y] = "." -        if x + 1 <= h - 1: -            dfs(x + 1, y) -        if x - 1 >= 0: -            dfs(x - 1, y) -        if y + 1 <= w - 1: -            dfs(x, y + 1) -        if y - 1 >= 0: -            dfs(x, y - 1) - - +lst = ["." * (w + 2)] +for _ in range(h): +    s = eval(input()) +    s = "." + s + "." +    lst.append(s) +lst.append("." * (w + 2)) -for i in range(h): -    for j in range(w): -        if lst[i][j] == "#": +for x in range(1, h + 1): +    for y in range(1, w + 1): +        if lst[x][y] == "#": -                (i - 1 >= 0 and lst[i - 1][j] == "#") -                or (i + 1 < h and lst[i + 1][j] == "#") -                or (j - 1 >= 0 and lst[i][j - 1] == "#") -                or (j + 1 < w and lst[i][j + 1] == "#") +                lst[x - 1][y] == "." +                and lst[x + 1][y] == "." +                and lst[x][y + 1] == "." +                and lst[x][y - 1] == "." -                dfs(i, j) -            else: