hw=[int(i) for i in input().split()]
s=['.'+input()+'.' for i in range(hw[0])]
s=['.'*(hw[1]+2)]+s+['.'*(hw[1]+2)]
print(s)
for i in range(1,hw[0]+1):
    for n in range(1,hw[1]+1):
        if s[i][n]=='#':
            print(s[i])
            if s[i+1][n]==s[i][n+1]==s[i-1][n]==s[i][n-1]=='.':
                print('No')
                exit()
print('Yes')