h, w = map(int, input().split()) S = [input() for i in range(h)] for di in range(h): for dj in range(w): if di == 0 and dj == 0: continue C = [[-1]*w for i in range(h)] flag = True for i in range(h): for j in range(w): if S[i][j] == '#' and C[i][j] == -1: C[i][j] = 0 ni, nj = i+di, j+dj if 0 <= ni < h and 0 <= nj < w: if S[ni][nj] == '#' and C[ni][nj] == -1: C[ni][nj] = 1 else: flag = False break else: flag = False break if flag: print('YES') exit() else: print('NO')