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] for h in range(1, H+1): for w in range(1, W+1): if can_be_painted(h, w, Smat, H, W): 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: print("NO")