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

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

up = down = right = left = '.'

for x in range(h):

    for y in range(w):

        if(list(s[x])[y] == '#'):

            if(y != w-1):

                right = list(s[x])[y+1]

            if(x != h-1):

                down = list(s[x+1])[y]

            if(x != 0):

                up = list(s[x-1])[y]

            if(y != 0):

                left = list(s[x])[y-1]

            if(up != '#' and down != '#' and right != '#' and left != '#'):

                print("No")

                exit()

            up = down = right = left = '.'

print("Yes")

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

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

for x in range(h):

    for y in range(w):

        if(s[x][y] == '#'):

            up = s[max(0, x-1)][y]

            down = s[min(h-1, x+1)][y]

            right = s[x][max(0, y-1)]

            left = s[x][min(w-1,  y+1)]

            if(up == '.' and down == '.' and right == '.' and left == '.'):

                print("No")

                exit()

print("Yes")

h, w = list(map(int, input().split()))
s = [eval(input()) for i in range(h)]
up = down = right = left = "."
for x in range(h):
    for y in range(w):
        if list(s[x])[y] == "#":
            if y != w - 1:
                right = list(s[x])[y + 1]
            if x != h - 1:
                down = list(s[x + 1])[y]
            if x != 0:
                up = list(s[x - 1])[y]
            if y != 0:
                left = list(s[x])[y - 1]
            if up != "#" and down != "#" and right != "#" and left != "#":
                print("No")
                exit()
            up = down = right = left = "."
print("Yes")

h, w = list(map(int, input().split()))
s = [list(eval(input())) for i in range(h)]
for x in range(h):
    for y in range(w):
        if s[x][y] == "#":
            up = s[max(0, x - 1)][y]
            down = s[min(h - 1, x + 1)][y]
            right = s[x][max(0, y - 1)]
            left = s[x][min(w - 1, y + 1)]
            if up == "." and down == "." and right == "." and left == ".":
                print("No")
                exit()
print("Yes")

-s = [eval(input()) for i in range(h)] -up = down = right = left = "." +s = [list(eval(input())) for i in range(h)] -        if list(s[x])[y] == "#": -            if y != w - 1: -                right = list(s[x])[y + 1] -            if x != h - 1: -                down = list(s[x + 1])[y] -            if x != 0: -                up = list(s[x - 1])[y] -            if y != 0: -                left = list(s[x])[y - 1] -            if up != "#" and down != "#" and right != "#" and left != "#": +        if s[x][y] == "#": +            up = s[max(0, x - 1)][y] +            down = s[min(h - 1, x + 1)][y] +            right = s[x][max(0, y - 1)] +            left = s[x][min(w - 1, y + 1)] +            if up == "." and down == "." and right == "." and left == ".": -            up = down = right = left = "."