import sys import copy input = sys.stdin.readline h, w = map(int, input().split()) s = [list(input().strip()) for i in range(h)] for dy in range(h): for dx in range(w): if dy == 0 and dx == 0: continue sc = copy.deepcopy(s) flag = True for i in range(h): for j in range(w): if sc[i][j] == '#': if i + dy >= h or j + dx >= w or sc[i+dy][j+dx] == '.': flag = False break else: sc[i+dy][j+dx] = '.' if not flag: break if flag: print('YES', end='') exit() print('NO', end='')