h, w = map(int, input().split()) S = [input() for _ in range(h)] ul = [[0] * w for _ in range(h)] ur = [[0] * w for _ in range(h)] dl = [[0] * w for _ in range(h)] dr = [[0] * w for _ in range(h)] for i in range(h): for j in range(w): if S[i][j] == ".": continue if i == 0: ul[i][j] = 1 ur[i][j] = 1 continue ul[i][j] = 1 ur[i][j] = 1 if j != 0: ul[i][j] = ul[i - 1][j - 1] + 1 if j != w - 1: ur[i][j] = ur[i - 1][j + 1] + 1 for i in range(h - 1, -1, -1): for j in range(w): if S[i][j] == ".": continue if i == h - 1: dl[i][j] = 1 dr[i][j] = 1 continue dl[i][j] = 1 dr[i][j] = 1 if j != 0: dl[i][j] = dl[i + 1][j - 1] + 1 if j != w - 1: dr[i][j] = dr[i + 1][j + 1] + 1 ul_imos = [[0] * (w + 1) for _ in range(h + 1)] ur_imos = [[0] * (w + 1) for _ in range(h + 1)] for i in range(h): for j in range(w): mi = min(ul[i][j], ur[i][j], dl[i][j], dr[i][j]) if mi <= 1: continue mi -= 1 ul_imos[i - mi][j + mi] += 1 ul_imos[i + mi + 1][j - mi - 1] -= 1 ur_imos[i - mi][j - mi] += 1 ur_imos[i + mi + 1][j + mi + 1] -= 1 for i in range(1, h + 1): for j in range(w + 1): if j != w: ul_imos[i][j] += ul_imos[i - 1][j + 1] if j != 0: ur_imos[i][j] += ur_imos[i - 1][j - 1] ok = True for i in range(h): for j in range(w): if S[i][j] == "#" and ul_imos[i][j] == 0 and ur_imos[i][j] == 0: ok = False break if not ok: break if ok: print("Yes") else: print("No")