H, W = map(int, input().split()) grid = [] for y in range(H): grid.append(input()) def check(dx, dy): if dx == 0 and dy == 0: return False used = {} for y in range(H): for x in range(W): ny = y + dy nx = x + dx if grid[y][x] != '#': continue if (x, y) in used: continue if ny >= H or nx >= W or nx < 0 or ny < 0: continue if (nx, ny) in used: continue if grid[ny][nx] != '#': continue used[(x, y)] = True used[(nx, ny)] = True for y in range(H): for x in range(W): if grid[y][x] == '#' and not (x, y) in used: return False return True ans = False for dy in range(-H+1, H): for dx in range(-W+1, W): ans = ans or check(dx, dy) print("YES" if ans else "NO")