a, b = map(int, input().split(' ')) sq = [input().strip() for i in range(a)] sq2 = [c for k in sq for c in k] ans = 'NO' if ('#' not in sq2) or sq2.count('#') % 2 == 1: print('NO') exit() for h in range(a): for w in range(b): sq3 = list('0'*len(sq2)) for t in range(len(sq2)): if sq2[t] == '#' and t < t+w+(b*h) < a*b: if sq2[t+w+(b*h)] == '#' and sq3[t]=='0': sq3[t] = '1' sq3[t+w+(b*h)] = '1' if sq2.count('#') == sq3.count('1'): ans = 'YES' break print(ans)