import sys H, W = map(int, input().split()) black_l = [] count = 0 for i in range(H): l = list(input()) for j in range(W): if l[j] == "#": black_l.append(H * i + j) count += 1 if count == 0: print("NO") sys.exit() if count % 2 == 0: num = count // 2 else: print("NO") sys.exit() for i in range(H): for j in range(W): if i == j == 0: continue nowuse = list(black_l) nowuse1 = list(black_l) while True: if (nowuse[0] % H) + j > W - 1: break ck_nom = nowuse[0] + j + i * H try: nowuse.remove(ck_nom) nowuse.pop(0) except: # print(i,j) # print(nowuse) break if len(nowuse) == 0: print("YES") sys.exit() while True: if (nowuse1[0] % H) - j < 0: break ck_nom = nowuse1[0] - j + i * H try: nowuse1.remove(ck_nom) nowuse1.pop(0) except: # print(i,j) # print(nowuse) break if len(nowuse1) == 0: print("YES") sys.exit() print("NO")