import sys def input(): return sys.stdin.readline().strip() def main(): h, w = map(int, input().split()) s = [input() for _ in range(h)] if sum(sum(sij == "#" for sij in si) for si in s) == 0: return "NO" for dh in range(-h+1, h): for dw in range(-w+1, w): fail = False filled = [[0]*w for _ in range(h)] for i in range(h): for j in range(w): if not (s[i][j] == "#" and not filled[i][j]): continue filled[i][j] = True ii, jj = i+dh, j+dw if 0 <= ii < h and 0 <= jj < w and s[ii][jj] == "#" and not filled[ii][jj]: filled[ii][jj] = True else: fail = True break if fail: break else: return "YES" return "NO" print(main())