H, W = map(int,input().split())
mp = [list(input()) for i in range(H)]
for i in range(H):
    mp[i].insert(0,'.')
    mp[i].append('.')
lo = ['.' for i in range(W+2)]
mp.insert(0,lo)
mp.append(lo)

dir =[[-1,0], [0,-1], [0,1], [1,0]]
def check(x,y):
    if mp[x][y] =='#':
        bw =False
        for i in range(len(dir)):
            if mp[x + dir[i][0]][y + dir[i][1]] =='#':
                bw = True
        if bw == True:
            return True
        else:
            return False
    else:
        return True

ok =True
for i in range(1,H+1):
    for k in range(1,W+1):
        if check(i,k) == False:
            ok = False
            break

if ok == True:
    print('YES')
else:
    print('NO')

