# -*- coding: utf-8 -*- from copy import deepcopy h,w = map(int, input().split()) s = [list(input()) for _ in range(h)] def check(dh,dw): s2 = deepcopy(s) for hi in range(h): for wi in range(w): if s2[hi][wi]=="#": if h>hi+dh>=0 and w>wi+dw>=0: if s2[hi+dh][wi+dw]=="#": s2[hi][wi] = "r" s2[hi+dh][wi+dw] = "b" else: return False else: return False return True for dh in range(1-h,h): for dw in range(1-w,w): if dh==0 and dw==0: continue if check(dh,dw): print("YES") exit() print("NO")