import copy H,W = map(int,input().split()) S = [list(input()) for _ in range(H)] A = [] for i in range(H): for j in range(W): if S[i][j]=="#": A.append((i,j)) if len(A)==0: flag = "NO" else: si,sj = A[0] for k in range(len(A)): flag = "YES" T = copy.deepcopy(S) y,x = A[k] di,dj = y-si,x-sj for m in range(len(A)): i,j = A[m] if T[i][j]=="#": T[i][j] = 0 if 0<=i+di