#import pysnooper

#import os,re,sys,operator,math,heapq,string

#from collections import Counter,deque

#from operator import itemgetter

#from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations

from sys import stdin,setrecursionlimit

#from copy import deepcopy



setrecursionlimit(10**6)

input=stdin.readline



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

s=[list(input().rstrip()) for _ in range(h)]

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

for i in range(h):

    for j in range(w):

        if j+1<w and (s[i][j],s[i][j+1])==("#","#"):

            mas[i][j],mas[i][j+1]="#","#"

        if j-1>=0 and (s[i][j],s[i][j-1])==("#","#"):

            mas[i][j],mas[i][j-1]="#","#"

        if i+1<h and (s[i][j],s[i+1][j])==("#","#"):

            mas[i][j],mas[i+1][j]="#","#"

        if i-1>=0 and (s[i][j],s[i-1][j])==("#","#"):

            mas[i-1][j],mas[i][j]="#","#"

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

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

#print(s)

for i in range(h):

    for j in range(w):

        #print(i,j)

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

            if i!=0:

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

                    continue

            if i!=h-1:

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

                    continue

            if j!=0:

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

                    continue

            if j!=w-1:

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

                    continue

            print("No")

            exit()

print("Yes")
# import pysnooper
# import os,re,sys,operator,math,heapq,string
# from collections import Counter,deque
# from operator import itemgetter
# from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations
from sys import stdin, setrecursionlimit

# from copy import deepcopy
setrecursionlimit(10**6)
input = stdin.readline
h, w = list(map(int, input().split()))
s = [list(input().rstrip()) for _ in range(h)]
mas = [["."] * w for _ in range(h)]
for i in range(h):
    for j in range(w):
        if j + 1 < w and (s[i][j], s[i][j + 1]) == ("#", "#"):
            mas[i][j], mas[i][j + 1] = "#", "#"
        if j - 1 >= 0 and (s[i][j], s[i][j - 1]) == ("#", "#"):
            mas[i][j], mas[i][j - 1] = "#", "#"
        if i + 1 < h and (s[i][j], s[i + 1][j]) == ("#", "#"):
            mas[i][j], mas[i + 1][j] = "#", "#"
        if i - 1 >= 0 and (s[i][j], s[i - 1][j]) == ("#", "#"):
            mas[i - 1][j], mas[i][j] = "#", "#"
print(("Yes" if mas == s else "No"))

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

-# import pysnooper -# import os,re,sys,operator,math,heapq,string -# from collections import Counter,deque -# from operator import itemgetter -# from itertools import accumulate,combinations,groupby,combinations_with_replacement,permutations -from sys import stdin, setrecursionlimit - -# from copy import deepcopy -setrecursionlimit(10**6) -input = stdin.readline -s = [list(input().rstrip()) for _ in range(h)] -mas = [["."] * w for _ in range(h)] +s = [list(eval(input())) for _ in range(h)] +# print(s) -        if j + 1 < w and (s[i][j], s[i][j + 1]) == ("#", "#"): -            mas[i][j], mas[i][j + 1] = "#", "#" -        if j - 1 >= 0 and (s[i][j], s[i][j - 1]) == ("#", "#"): -            mas[i][j], mas[i][j - 1] = "#", "#" -        if i + 1 < h and (s[i][j], s[i + 1][j]) == ("#", "#"): -            mas[i][j], mas[i + 1][j] = "#", "#" -        if i - 1 >= 0 and (s[i][j], s[i - 1][j]) == ("#", "#"): -            mas[i - 1][j], mas[i][j] = "#", "#" -print(("Yes" if mas == s else "No")) +        # print(i,j) +        if s[i][j] == "#": +            if i != 0: +                if s[i - 1][j] == "#": +                    continue +            if i != h - 1: +                if s[i + 1][j] == "#": +                    continue +            if j != 0: +                if s[i][j - 1] == "#": +                    continue +            if j != w - 1: +                if s[i][j + 1] == "#": +                    continue +            print("No") +            exit() +print("Yes")