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

s=list(eval(input()) for _ in range(h))

flag=1

for i in range(h):

    for j in range(w):

        check=0

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

            if i!=0 and s[i-1][j]=="#":check +=1

            if i!=h-1 and s[i+1][j]=="#":check += 1

            if j!=0 and s[i][j-1]=="#":check += 1

            if j!=w-1 and s[i][j+1]=="#":check += 1

            if check==0:flag=0

print(("Yes" if flag else "No"))
h,w=list(map(int,input().split()))

#枠を大きめに確保してout of rangeを避ける!

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

for _ in range(h):

    grid.append("." + eval(input()) + ".")

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



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

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

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

            if not (grid[i][j-1]=="#" or grid[i][j+1]=="#"or \

                grid[i-1][j]=="#" or grid[i+1][j]=="#"):

                    print("No")

                    exit()

print("Yes")
h, w = list(map(int, input().split()))
s = list(eval(input()) for _ in range(h))
flag = 1
for i in range(h):
    for j in range(w):
        check = 0
        if s[i][j] == "#":
            if i != 0 and s[i - 1][j] == "#":
                check += 1
            if i != h - 1 and s[i + 1][j] == "#":
                check += 1
            if j != 0 and s[i][j - 1] == "#":
                check += 1
            if j != w - 1 and s[i][j + 1] == "#":
                check += 1
            if check == 0:
                flag = 0
print(("Yes" if flag else "No"))

h, w = list(map(int, input().split()))
# 枠を大きめに確保してout of rangeを避ける!
grid = ["." * (w + 2)]
for _ in range(h):
    grid.append("." + eval(input()) + ".")
grid += ["." * (w + 2)]
for i in range(1, h + 1):
    for j in range(1, w + 1):
        if grid[i][j] == "#":
            if not (
                grid[i][j - 1] == "#"
                or grid[i][j + 1] == "#"
                or grid[i - 1][j] == "#"
                or grid[i + 1][j] == "#"
            ):
                print("No")
                exit()
print("Yes")

-s = list(eval(input()) for _ in range(h)) -flag = 1 -for i in range(h): -    for j in range(w): -        check = 0 -        if s[i][j] == "#": -            if i != 0 and s[i - 1][j] == "#": -                check += 1 -            if i != h - 1 and s[i + 1][j] == "#": -                check += 1 -            if j != 0 and s[i][j - 1] == "#": -                check += 1 -            if j != w - 1 and s[i][j + 1] == "#": -                check += 1 -            if check == 0: -                flag = 0 -print(("Yes" if flag else "No")) +# 枠を大きめに確保してout of rangeを避ける! +grid = ["." * (w + 2)] +for _ in range(h): +    grid.append("." + eval(input()) + ".") +grid += ["." * (w + 2)] +for i in range(1, h + 1): +    for j in range(1, w + 1): +        if grid[i][j] == "#": +            if not ( +                grid[i][j - 1] == "#" +                or grid[i][j + 1] == "#" +                or grid[i - 1][j] == "#" +                or grid[i + 1][j] == "#" +            ): +                print("No") +                exit() +print("Yes")