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

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

visited = [["." for _ in range(w)] for _ in range(h)]



mx = [0, 1, 0, -1]

my = [1, 0, -1, 0]

for i in range(h):

  for  j in range(w):

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

      for k in range(4):

        tx, ty = j + mx[k], i + my[k]

        if 0 <= tx < w and 0 <= ty < h and table[ty][tx] == "#":

          visited[i][j] = visited[ty][tx] = "#"



for i in range(h):

  for  j in range(w):

    if table[i][j] != visited[i][j]:

      print("No")

      exit(0)

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

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



mx = [0, 1, 0, -1]

my = [1, 0, -1, 0]

for i in range(h):

  for  j in range(w):

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

      for k in range(4):

        tx, ty = j + mx[k], i + my[k]

        if 0 <= tx < w and 0 <= ty < h and table[ty][tx] == "#":

          break

      else:

        print("No")

        exit(0)

print("Yes")

h, w = list(map(int, input().split()))
table = [list(eval(input())) for _ in range(h)]
visited = [["." for _ in range(w)] for _ in range(h)]
mx = [0, 1, 0, -1]
my = [1, 0, -1, 0]
for i in range(h):
    for j in range(w):
        if table[i][j] == "#":
            for k in range(4):
                tx, ty = j + mx[k], i + my[k]
                if 0 <= tx < w and 0 <= ty < h and table[ty][tx] == "#":
                    visited[i][j] = visited[ty][tx] = "#"
for i in range(h):
    for j in range(w):
        if table[i][j] != visited[i][j]:
            print("No")
            exit(0)
print("Yes")

h, w = list(map(int, input().split()))
table = [list(eval(input())) for _ in range(h)]
mx = [0, 1, 0, -1]
my = [1, 0, -1, 0]
for i in range(h):
    for j in range(w):
        if table[i][j] == "#":
            for k in range(4):
                tx, ty = j + mx[k], i + my[k]
                if 0 <= tx < w and 0 <= ty < h and table[ty][tx] == "#":
                    break
            else:
                print("No")
                exit(0)
print("Yes")

-visited = [["." for _ in range(w)] for _ in range(h)] -                    visited[i][j] = visited[ty][tx] = "#" -for i in range(h): -    for j in range(w): -        if table[i][j] != visited[i][j]: -            print("No") -            exit(0) +                    break +            else: +                print("No") +                exit(0)