H, W = map(int, input().split()) S = [input() for _ in range(H)] mx1 = [[0]*(W+2) for _ in range(H+2)] mx2 = [[0]*(W+2) for _ in range(H+2)] mx3 = [[0]*(W+2) for _ in range(H+2)] mx4 = [[0]*(W+2) for _ in range(H+2)] for i in range(H): for j in range(W): if S[i][j] == '#': mx1[i][j] = mx1[i-1][j-1] + 1 for i in range(H): for j in range(W): if S[i][j] == '#': mx2[i][j] = mx2[i-1][j+1] + 1 for i in range(H-1,-1,-1): for j in range(W): if S[i][j] == '#': mx3[i][j] = mx3[i+1][j-1] + 1 for i in range(H-1,-1,-1): for j in range(W): if S[i][j] == '#': mx4[i][j] = mx4[i+1][j+1] + 1 imos1 = [[0]*(W+2) for _ in range(H+2)] imos2 = [[0]*(W+2) for _ in range(H+2)] for i in range(H): for j in range(W): r = min(mx1[i][j], mx2[i][j], mx3[i][j], mx4[i][j]) - 1 if r <= 0: continue imos1[i - r][j - r]+=1 imos1[i + r + 1][j + r + 1]-=1 imos2[i - r][j + r]+=1 imos2[i + r + 1][j - r - 1]-=1 for i in range(H): for j in range(W): imos1[i][j] += imos1[i - 1][j - 1] imos2[i][j] += imos2[i - 1][j + 1] same = True for i in range(H): for j in range(W): if S[i][j] == '#' and imos1[i][j] + imos2[i][j] == 0: same = False print("Yes" if same else "No")