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

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

flag=True

count=0

for i in range(h):

  if flag==False:

    break

  for j in range(w):

    if flag==False:

      break

    flag2=False

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

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

        flag=False

      elif i>0 and s[i-1][j]=="#":

        flag2=True

        

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

        flag=False

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

        flag2=True

        

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

        flag=False

      elif j>0 and s[i][j-1]=="#":

        flag2=True

      

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

        flag=False

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

        flag2=True

      if flag2:

        flag=True

    else:

      count+=1

        

if h==1 and w==1:

  if s[0][0]=="#":

    flag=False

    

if count==(h*w):

  flag=True

  

if flag:

  print("Yes")

else:

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

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

flag=False

count=0

for i in range(h):

  if flag==True:

    break

  for j in range(w):

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

      count=0

      if i+1<=h-1 and s[i+1][j]==".":

        count+=1

      if 0<=i-1 and s[i-1][j]==".":

        count+=1

      if j+1<=w-1 and s[i][j+1]==".":

        count+=1

      if 0<=j-1 and s[i][j-1]==".":

        count+=1

    if count==4:

      flag=True

      break

if flag:

  print("No")

else:

  print("Yes")

      

        
h, w = list(map(int, input().split()))
s = [list(eval(input())) for i in range(h)]
flag = True
count = 0
for i in range(h):
    if flag == False:
        break
    for j in range(w):
        if flag == False:
            break
        flag2 = False
        if s[i][j] == "#":
            if i > 0 and s[i - 1][j] != "#":
                flag = False
            elif i > 0 and s[i - 1][j] == "#":
                flag2 = True
            if i < (h - 1) and s[i + 1][j] != "#":
                flag = False
            elif i < (h - 1) and s[i + 1][j] == "#":
                flag2 = True
            if j > 0 and s[i][j - 1] != "#":
                flag = False
            elif j > 0 and s[i][j - 1] == "#":
                flag2 = True
            if j < (w - 1) and s[i][j + 1] != "#":
                flag = False
            elif j < (w - 1) and s[i][j + 1] == "#":
                flag2 = True
            if flag2:
                flag = True
        else:
            count += 1
if h == 1 and w == 1:
    if s[0][0] == "#":
        flag = False
if count == (h * w):
    flag = True
if flag:
    print("Yes")
else:
    print("No")

h, w = list(map(int, input().split()))
s = [list(eval(input())) for i in range(h)]
flag = False
count = 0
for i in range(h):
    if flag == True:
        break
    for j in range(w):
        if s[i][j] == "#":
            count = 0
            if i + 1 <= h - 1 and s[i + 1][j] == ".":
                count += 1
            if 0 <= i - 1 and s[i - 1][j] == ".":
                count += 1
            if j + 1 <= w - 1 and s[i][j + 1] == ".":
                count += 1
            if 0 <= j - 1 and s[i][j - 1] == ".":
                count += 1
        if count == 4:
            flag = True
            break
if flag:
    print("No")
else:
    print("Yes")

-flag = True +flag = False -    if flag == False: +    if flag == True: -        if flag == False: +        if s[i][j] == "#": +            count = 0 +            if i + 1 <= h - 1 and s[i + 1][j] == ".": +                count += 1 +            if 0 <= i - 1 and s[i - 1][j] == ".": +                count += 1 +            if j + 1 <= w - 1 and s[i][j + 1] == ".": +                count += 1 +            if 0 <= j - 1 and s[i][j - 1] == ".": +                count += 1 +        if count == 4: +            flag = True -        flag2 = False -        if s[i][j] == "#": -            if i > 0 and s[i - 1][j] != "#": -                flag = False -            elif i > 0 and s[i - 1][j] == "#": -                flag2 = True -            if i < (h - 1) and s[i + 1][j] != "#": -                flag = False -            elif i < (h - 1) and s[i + 1][j] == "#": -                flag2 = True -            if j > 0 and s[i][j - 1] != "#": -                flag = False -            elif j > 0 and s[i][j - 1] == "#": -                flag2 = True -            if j < (w - 1) and s[i][j + 1] != "#": -                flag = False -            elif j < (w - 1) and s[i][j + 1] == "#": -                flag2 = True -            if flag2: -                flag = True -        else: -            count += 1 -if h == 1 and w == 1: -    if s[0][0] == "#": -        flag = False -if count == (h * w): -    flag = True +    print("No") +else: -else: -    print("No")