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

s = []

for i in range(h):

    s += [eval(input())]



dx = [1, -1, 0, 0]

dy = [0, 0, 1, -1]



ans = True

for i in range(h):

    for j in range(w):

        if (s[i][j] == '#'):

            found = False

            for k in range(4):

                i2 = i + dx[k]

                j2 = j + dy[k]

                if (0 <= i2 < h) and (0 <= j2 < w) and (s[i2][j2] == '#'):

                    found = True

            if not(found):

                ans = False



if ans:

    print('Yes')

else:

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

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



bk = '#'

wt = '.'



for r in range(h):

    for c in range(w):

        if M[r][c] == bk:

            flg = False

            for dx, dy in [(-1, 0), (0, -1), (1, 0), (0, 1)]:

                r2 = r + dy

                c2 = c + dx

                if (0 <= r2 < h) and (0 <= c2 < w):

                    if M[r2][c2] == bk:

                        flg = True

                        break

            if not flg:

                print('No')

                exit()

print('Yes')
h, w = list(map(int, input().split()))
s = []
for i in range(h):
    s += [eval(input())]
dx = [1, -1, 0, 0]
dy = [0, 0, 1, -1]
ans = True
for i in range(h):
    for j in range(w):
        if s[i][j] == "#":
            found = False
            for k in range(4):
                i2 = i + dx[k]
                j2 = j + dy[k]
                if (0 <= i2 < h) and (0 <= j2 < w) and (s[i2][j2] == "#"):
                    found = True
            if not (found):
                ans = False
if ans:
    print("Yes")
else:
    print("No")

h, w = list(map(int, input().split()))
M = [eval(input()) for _ in range(h)]
bk = "#"
wt = "."
for r in range(h):
    for c in range(w):
        if M[r][c] == bk:
            flg = False
            for dx, dy in [(-1, 0), (0, -1), (1, 0), (0, 1)]:
                r2 = r + dy
                c2 = c + dx
                if (0 <= r2 < h) and (0 <= c2 < w):
                    if M[r2][c2] == bk:
                        flg = True
                        break
            if not flg:
                print("No")
                exit()
print("Yes")

-s = [] -for i in range(h): -    s += [eval(input())] -dx = [1, -1, 0, 0] -dy = [0, 0, 1, -1] -ans = True -for i in range(h): -    for j in range(w): -        if s[i][j] == "#": -            found = False -            for k in range(4): -                i2 = i + dx[k] -                j2 = j + dy[k] -                if (0 <= i2 < h) and (0 <= j2 < w) and (s[i2][j2] == "#"): -                    found = True -            if not (found): -                ans = False -if ans: -    print("Yes") -else: -    print("No") +M = [eval(input()) for _ in range(h)] +bk = "#" +wt = "." +for r in range(h): +    for c in range(w): +        if M[r][c] == bk: +            flg = False +            for dx, dy in [(-1, 0), (0, -1), (1, 0), (0, 1)]: +                r2 = r + dy +                c2 = c + dx +                if (0 <= r2 < h) and (0 <= c2 < w): +                    if M[r2][c2] == bk: +                        flg = True +                        break +            if not flg: +                print("No") +                exit() +print("Yes")