def check(di,dj): flag = [[True for i in xrange(W)] for i in xrange(H)] for i in xrange(H): for j in xrange(W): if M[i][j] == "#" and flag[i][j]: ni = i + di nj = j + dj if 0 <= ni < H and 0 <= nj < W and M[ni][nj] == "#": flag[ni][nj] = False else: return False return True H,W = map(int,raw_input().split(" ")) M = [list(raw_input()) for i in xrange(H)] if sum(1 for i in xrange(H*W) if M[i/H][i%H] == "#") == 0: print "NO" quit() for j in xrange(1,W): if check(0,j): print "YES" quit() for i in xrange(1,H): for j in xrange(-W+1,W): if check(i,j): print "YES" quit() print "NO"