H,W = map(int,input().split())

S = [input().strip() for _ in range(H)]

flag = 0

for i in range(H):

    for j in range(W):

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

            if j+1<W and S[i][j+1]=="." and i-1>=0 and S[i-1][j]=="." and j-1>=0 and S[i][j-1]=="." \

            and i+1<H and S[i+1][j]==".":

                flag = 1

                break

    if flag==1:break

if flag==0:

    print("Yes")

else:

    print("No")

H,W = list(map(int,input().split()))

S = [input().strip() for _ in range(H)]

for i in range(H):

    S[i] = "."+S[i]+"."

S.insert(0,"."*(W+2))

S.append("."*(W+2))

flag = 0

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

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

        if S[i][j]=="#" and S[i][j+1]=="." and S[i-1][j]=="." and S[i][j-1]=="." and S[i+1][j]==".":

            flag = 1

            break

    if flag==1:break

if flag==0:

    print("Yes")

else:

    print("No")
H, W = map(int, input().split())
S = [input().strip() for _ in range(H)]
flag = 0
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            if (
                j + 1 < W
                and S[i][j + 1] == "."
                and i - 1 >= 0
                and S[i - 1][j] == "."
                and j - 1 >= 0
                and S[i][j - 1] == "."
                and i + 1 < H
                and S[i + 1][j] == "."
            ):
                flag = 1
                break
    if flag == 1:
        break
if flag == 0:
    print("Yes")
else:
    print("No")

H, W = list(map(int, input().split()))
S = [input().strip() for _ in range(H)]
for i in range(H):
    S[i] = "." + S[i] + "."
S.insert(0, "." * (W + 2))
S.append("." * (W + 2))
flag = 0
for i in range(1, H + 1):
    for j in range(1, W + 1):
        if (
            S[i][j] == "#"
            and S[i][j + 1] == "."
            and S[i - 1][j] == "."
            and S[i][j - 1] == "."
            and S[i + 1][j] == "."
        ):
            flag = 1
            break
    if flag == 1:
        break
if flag == 0:
    print("Yes")
else:
    print("No")

-H, W = map(int, input().split()) +H, W = list(map(int, input().split())) +for i in range(H): +    S[i] = "." + S[i] + "." +S.insert(0, "." * (W + 2)) +S.append("." * (W + 2)) -for i in range(H): -    for j in range(W): -        if S[i][j] == "#": -            if ( -                j + 1 < W -                and S[i][j + 1] == "." -                and i - 1 >= 0 -                and S[i - 1][j] == "." -                and j - 1 >= 0 -                and S[i][j - 1] == "." -                and i + 1 < H -                and S[i + 1][j] == "." -            ): -                flag = 1 -                break +for i in range(1, H + 1): +    for j in range(1, W + 1): +        if ( +            S[i][j] == "#" +            and S[i][j + 1] == "." +            and S[i - 1][j] == "." +            and S[i][j - 1] == "." +            and S[i + 1][j] == "." +        ): +            flag = 1 +            break