import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines import itertools H,W = map(int,readline().split()) data = ''.join(read().decode().split()) if not data.count('#'): print('NO') exit() def test(a,b): if a==b==0: return False close = [0] * (H*W) for x,y in itertools.product(range(H), range(W)): ind = W*x + y if close[ind]: continue if data[ind] == '.': continue x1,y1 = x+a, y+b if x1 >= H or y1 < 0 or y1 >= W: return False ind1 = W*x1 + y1 if data[ind1] == '.': return False close[ind] = 1 close[ind1] = 1 return True bl = any(test(a,b) for a in range(51) for b in range(-51,51)) answer = 'YES' if bl else 'NO' print(answer)