import sys def input(): return sys.stdin.readline().strip() def main(): h, w = map(int, input().split()) s = [input() for _ in range(h)] for dh in range(h): for dw in range(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 ii < h and 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())