H,W=map(int,input().split()) grid=[[0]*W for _ in range(H)] for h in range(H): for w,s in enumerate(input().rstrip()): grid[h][w]=s for h0 in range(-H,H): for w0 in range(-W,W): if (h0,w0)==(0,0): continue flg=0 used=[[0]*W for _ in range(H)] for h in range(H): for w in range(W): if grid[h][w]==".": continue if grid[h][w]=="#": if used[h][w]==1: continue if not (h+h0<0 or w+w0<0 or h+h0>=H or w+w0>=W or grid[h+h0][w+w0]=="."): used[h+h0][w+w0]=1 continue flg=1 break if flg==1: break if flg==0: print("YES") exit() print("NO")