H, W = map(int, input().split()) S = [input() for _ in range(H)] def func(ty, tx): if tx == 0 and ty == 0: return False CL = [[False] * W for _ in range(H)] for y in range(H): for x in range(W): if S[y][x] == "#" and CL[y][x] == False: if x+tx >= W or x+tx < 0 or y+ty >= H: return False if S[y+ty][x+tx] == "#" and CL[y+ty][x+tx] == False: CL[y][x] = True CL[y+ty][x+tx] = True else: return False return True for ty in range(H): for tx in range(-W+1,W): if func(ty, tx): print("YES") exit() print("NO")