h,w = map(int,input().split()); s = [] for _ in range(h): s += [v=="#" for v in input()] lurd = s[:] for i in range(h-1): for j in range(w-1): lurd[w*(i+1)+(j+1)] += lurd[w*i+j] rdlu = s[:] for i in range(h-1,0,-1): for j in range(w-1,0,-1): rdlu[w*(i-1)+(j-1)] += rdlu[w*i+j] ruld = s[:] for i in range(h-1): for j in range(w-1,0,-1): ruld[w*(i+1)+(j-1)] += ruld[w*i+j] ldru = s[:] for i in range(h-1,0,-1): for j in range(w-1): ldru[w*(i-1)+(j+1)] += ldru[w*i+j] p1 = [0]*(h+1)*(w+1) p2 = [0]*(h+1)*(w+1) p3 = [0]*(h+1)*(w+1) p4 = [0]*(h+1)*(w+1) for i in range(1,h-1): for j in range(1,w-1): if s[w*i+j]==0: continue ac1 = 0; wa = min(h-i,w-j) while wa-ac1>1: wj = (ac1+wa)//2 if lurd[w*(i+wj)+(j+wj)]-lurd[w*i+j]==wj: ac1 = wj else: wa = wj ac2 = 0; wa = min(i+1,j+1) while wa-ac2>1: wj = (ac2+wa)//2 if rdlu[w*(i-wj)+(j-wj)]-rdlu[w*i+j]==wj: ac2 = wj else: wa = wj ac3 = 0; wa = min(h-i,j+1) while wa-ac3>1: wj = (ac3+wa)//2 if ruld[w*(i+wj)+(j-wj)]-ruld[w*i+j]==wj: ac3 = wj else: wa = wj ac4 = 0; wa = min(i+1,w-j) while wa-ac4>1: wj = (ac4+wa)//2 if ldru[w*(i-wj)+(j+wj)]-ldru[w*i+j]==wj: ac4 = wj else: wa = wj m = min(ac1,ac2,ac3,ac4) if m==0: continue p1[(w+1)*i+j] += 1; p1[(w+1)*(i+m+1)+(j+m+1)] -= 1 p2[(w+1)*i+j] += 1; p2[(w+1)*(i-m-1)+(j-m-1)] -= 1 p3[(w+1)*i+j] += 1; p3[(w+1)*(i+m+1)+(j-m-1)] -= 1 p4[(w+1)*i+j] += 1; p4[(w+1)*(i-m-1)+(j+m+1)] -= 1 t = [False]*h*w for i in range(h): for j in range(w): t[w*i+j] |= p1[(w+1)*i+j]>0 p1[(w+1)*(i+1)+(j+1)] += p1[(w+1)*i+j] for i in range(h-1,-1,-1): for j in range(w-1,-1,-1): t[w*i+j] |= p2[(w+1)*i+j]>0 p2[(w+1)*(i-1)+(j-1)] += p2[(w+1)*i+j] for i in range(h): for j in range(w-1,-1,-1): t[w*i+j] |= p3[(w+1)*i+j]>0 p3[(w+1)*(i+1)+(j-1)] += p3[(w+1)*i+j] for i in range(h-1,-1,-1): for j in range(w): t[w*i+j] |= p4[(w+1)*i+j]>0 p4[(w+1)*(i-1)+(j+1)] += p4[(w+1)*i+j] print("Yes" if s==t else "No")