def solve(h, w, map_ls): ct = map_ls.count('#') if ct == 0 or ct % 2 == 1: return 'NO' for dx in range(-(w - 1), w): for dy in range(h): if dx <= 0 and dy == 0: continue memo = [c for c in map_ls] for i_s, m in enumerate(memo): if m == '.': continue sx, sy = i_s % w, i_s // w gx, gy = sx + dx, sy + dy i_g = w * gy + gx if not (0 <= gx < w and 0 <= gy < h): break if not memo[i_g] == '#': break memo[i_s] = '.' memo[i_g] = '.' else: if not '#' in memo: return 'YES' return 'NO' h, w = map(int, input().split()) map_ls = [c for i in range(h) for c in input()] print(solve(h, w, map_ls))