# 2020/01/01 # 解答かんにんぐ from copy import deepcopy h,w=map(int,input().split()) s=[list(input()) for _ in range(h)] def check(x,y): g=deepcopy(s) flag=False for i in range(h): for j in range(w): if g[i][j] in ['.','R','B']:continue if i+y>=h or j+x>=w:return False if g[i][j]==g[i+y][j+x]=='#': flag=True g[i][j]='R' g[i+y][j+x]='B' else:return False return flag for x in range(-w,w+1): for y in range(-h,h+1): if x==y==0:continue res=check(x,y) if res: print('YES') exit() print('NO')