from copy import deepcopy def search(yi, xi): global overy global overx SC = deepcopy(S) yt = 0 while(yt < H): xt = 0 while(xt < W): if SC[yt][xt] == "#": try: if SC[yt+yi][xt+xi] == "#": SC[yt+yi][xt+xi] = "$" else: return False except IndexError: if yt+yi >= H: overy = yi if xt+xi >= W: overx = xi return False xt += 1 yt += 1 return True H, W = list(map(int, input().split())) S = [0] * H for i in range(H): S[i] = list(input()) printed = False y = 0 overy, overx = float("inf"), float("inf") while(y < H): x = 0 while(x < W): if S[y][x] == "#": yi = -y while(y + yi < H): xi = -x while(x + xi < W): if yi != 0 or xi != 0: if S[y+yi][x+xi] == "#": if search(yi, xi): yi, xi = float("inf"), float("inf") print("YES") printed = True xi += 1 if overx < xi: xi = float("inf") yi += 1 if overy < yi: yi = float("inf") y, x = float("inf"), float("inf") x += 1 y += 1 if y >= H and not printed: print("NO")