h,w=map(int,input().split())
s=["."+input()+"." for i in range(h)]
s=["."*(w+2)]+s+["."*(w+2)]
flag=0
print(s)
for i in range(h):
  for j in range(w):
    print(s[i][j])
    if s[i][j]=="#":
      if s[i-1][j]=="." and s[i+1][j]=="." and s[i][j-1]=="." and s[i][j+1]==".":
        flag=1
print("Yes" if flag==0 else "No")