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

s = []

for row in range(h):

    line = eval(input())

    tmp = []

    for column in range(w):

        tmp.append(line[column])

    s.append(tmp)



sx = [-1, 0, 0, 1]

sy = [0, 1, -1, 0]



res = True

for row in range(h):

    for column in range(w):

        if s[row][column] == "#":

            count = 0

            for i in range(len(sx)):

                if row + sx[i] < 0 or len(s) <= row + sx[i]:

                    continue

                if column + sy[i] < 0 or len(s[row]) <= column + sy[i]:

                    continue

                if s[row + sx[i]][column + sy[i]] == "#":

                    count += 1

            if count == 0:

                res = False



print(("Yes" if res == True else "No"))

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

s = []

for row in range(h):

    line = eval(input())

    tmp = []

    for column in range(w):

        tmp.append(line[column])

    s.append(tmp)



sx = [-1, 0, 0, 1]

sy = [0, 1, -1, 0]



res = True

for row in range(h):

    for column in range(w):

        if s[row][column] == "#":

            count = 0

            for i in range(len(sx)):

                row_target = row + sx[i]

                column_target = column + sy[i]

                if row_target < 0 or len(s) <= row_target:

                    continue

                if column_target < 0 or len(s[row]) <= column_target:

                    continue

                if s[row_target][column_target] == "#":

                    count += 1

            if count == 0:

                res = False



print(("Yes" if res == True else "No"))



h, w = list(map(int, input().split(" ")))
s = []
for row in range(h):
    line = eval(input())
    tmp = []
    for column in range(w):
        tmp.append(line[column])
    s.append(tmp)
sx = [-1, 0, 0, 1]
sy = [0, 1, -1, 0]
res = True
for row in range(h):
    for column in range(w):
        if s[row][column] == "#":
            count = 0
            for i in range(len(sx)):
                if row + sx[i] < 0 or len(s) <= row + sx[i]:
                    continue
                if column + sy[i] < 0 or len(s[row]) <= column + sy[i]:
                    continue
                if s[row + sx[i]][column + sy[i]] == "#":
                    count += 1
            if count == 0:
                res = False
print(("Yes" if res == True else "No"))

h, w = list(map(int, input().split(" ")))
s = []
for row in range(h):
    line = eval(input())
    tmp = []
    for column in range(w):
        tmp.append(line[column])
    s.append(tmp)
sx = [-1, 0, 0, 1]
sy = [0, 1, -1, 0]
res = True
for row in range(h):
    for column in range(w):
        if s[row][column] == "#":
            count = 0
            for i in range(len(sx)):
                row_target = row + sx[i]
                column_target = column + sy[i]
                if row_target < 0 or len(s) <= row_target:
                    continue
                if column_target < 0 or len(s[row]) <= column_target:
                    continue
                if s[row_target][column_target] == "#":
                    count += 1
            if count == 0:
                res = False
print(("Yes" if res == True else "No"))

-                if row + sx[i] < 0 or len(s) <= row + sx[i]: +                row_target = row + sx[i] +                column_target = column + sy[i] +                if row_target < 0 or len(s) <= row_target: -                if column + sy[i] < 0 or len(s[row]) <= column + sy[i]: +                if column_target < 0 or len(s[row]) <= column_target: -                if s[row + sx[i]][column + sy[i]] == "#": +                if s[row_target][column_target] == "#":