h,w = map(int,input().split())

mp = []
for i in range(h):
    tmp = list(input())
    tml = []
    for j in range(w):
        tml.append(0 if tmp[j] == "." else 1)
    mp.append(tml)

flg = 0
for i in range(1,h-1):
    for j in range(1,w-1):
        if(mp[i-1][j]+mp[i+1][j]+mp[i][j-1]+mp[i][j+1] == 0):
            flag = 1
            break
        
ans = ["YES","NO"]
		
print(ans[flag])