def read_data(): H, W = map(int, input().split()) S = [input() for i in range(H)] return H, W, S def solve(H, W, S): Smat = [[c == '#' for c in row] for row in S] if has_no_sharp(Smat): return False for h in range(H): for w in range(W): if h == w == 0: continue if can_be_painted(h, w, Smat, H, W): return True return False def has_no_sharp(Smat): for row in Smat: if any(row): return True return False def can_be_painted(h, w, Smat, H, W): Scopy = [row[:] for row in Smat] for x in range(H): for y in range(W): if Scopy[x][y]: if x+h >= H or y+w >= W or not Scopy[x+h][y+w]: return False else: Scopy[x+h][y+w] = False return True H, W, S = read_data() if solve(H, W, S): print("YES") else: Sreverse = [list(reversed(row)) for row in S] if solve(H, W, Sreverse): print("YES") else: print("NO")