h, w = [int(x) for x in input().split()] tiles = [] for i in range(h): l = input() for j in range(w): if l[j] == "#": tiles.append((i, j)) vec = [] for i in range(h): for j in range(-1 * w + 1 ,w): vec.append((i, j)) del vec[vec.index((0, 0))] tiles_num = len(tiles) if tiles_num == 0: print("NO") else: result = False for v in vec: ans = set() ans_num = 0 for t in tiles: ot = (t[0] + v[0], t[1] + v[1]) if t not in ans: if ot in tiles: if ot not in ans: ans.add(t) ans.add(ot) ans_num += 2 if tiles_num == ans_num: result = True break if result: print("YES") else: print("NO")