#include<bits/stdc++.h>
using namespace std;

int main()
{
    int H,W;
    int cnt=0;
    cin >> H >> W;
    char A[H][W];
    int B[H][W];
    int C[H][W];
    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            B[i][j] = 0;
            C[i][j] = 0;
        }
    }
    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            cin >> A[i][j];
            if(A[i][j] == '#'){
                C[i][j] = 1;
            }
        }
    }
    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            if(A[i][j] == '#'){
                if(i == 0){
                    if(j== 0){
                        if(A[i][j+1] == '#'){
                            B[i][j] = 1;
                            B[i][j+1] = 1;
                        }else if(A[i+1][j] == '#'){
                            B[i][j] = 1;
                            B[i+1][j] = 1;
                        }
                    }else if(j != W-1){
                        if(A[i][j-1] == '#'){
                            B[i][j] = 1;
                            B[i][j-1] = 1;
                        }else if(A[i+1][j] == '#'){
                            B[i][j] = 1;
                            B[i+1][j] = 1;
                        }else if(A[i][j+1] == '#'){
                            B[i][j] = 1;
                            B[i][j+1] = 1;
                        }
                    }else if(j == W-1){
                        if(A[i][j-1] == '#'){
                            B[i][j] = 1;
                            B[i][j-1] = 1;
                        }else if(A[i+1][j] == '#'){
                            B[i][j] = 1;
                            B[i+1][j] = 1;
                        }
                    }
                }else if(i != H-1){
                    if(j== 0){
                        if(A[i][j+1] == '#'){
                            B[i][j] = 1;
                            B[i][j+1] = 1;
                        }else if(A[i+1][j] == '#'){
                            B[i][j] = 1;
                            B[i+1][j] = 1;
                        }else if(A[i-1][j] == '#'){
                            B[i][j] = 1;
                            B[i-1][j] = 1;
                        }
                    }else if(j != W-1){
                        if(A[i][j-1] == '#'){
                            B[i][j] = 1;
                            B[i][j-1] = 1;
                        }else if(A[i+1][j] == '#'){
                            B[i][j] = 1;
                            B[i+1][j] = 1;
                        }else if(A[i][j+1] == '#'){
                            B[i][j] = 1;
                            B[i][j+1] = 1;
                        }else if(A[i-1][j] == '#'){
                            B[i][j] = 1;
                            B[i-1][j] = 1;
                        }
                    }else if(j == W-1){
                        if(A[i][j-1] == '#'){
                            B[i][j] = 1;
                            B[i][j-1] = 1;
                        }else if(A[i-1][j] == '#'){
                            B[i][j] = 1;
                            B[i-1][j] = 1;
                        }else if(A[i+1][j] == '#'){
                            B[i][j] = 1;
                            B[i+1][j] = 1;
                        }
                    }
                }else if(i == H-1){
                    if(j== 0){
                        if(A[i][j+1] == '#'){
                            B[i][j] = 1;
                            B[i][j+1] = 1;
                        }else if(A[i-1][j] == '#'){
                            B[i][j] = 1;
                            B[i-1][j] = 1;
                        }
                    }else if(j != W-1){
                        if(A[i][j-1] == '#'){
                            B[i][j] = 1;
                            B[i][j-1] = 1;
                        }else if(A[i-1][j] == '#'){
                            B[i][j] = 1;
                            B[i-1][j] = 1;
                        }else if(A[i][j+1] == '#'){
                            B[i][j] = 1;
                            B[i][j+1] = 1;
                        }
                    }else if(j == W-1){
                        if(A[i][j-1] == '#'){
                            B[i][j] = 1;
                            B[i][j-1] = 1;
                        }else if(A[i-1][j] == '#'){
                            B[i][j] = 1;
                            B[i-1][j] = 1;
                        }
                    }
                }
            }
        }
    }

    // cout << "--" << endl;
    // for(int i=0; i<H; i++){
    //     for(int j=0; j<W; j++){
    //         cout << B[i][j] << " ";
    //     }
    //     cout << endl;
    // }
    //
    // cout << "--" << endl;
    // for(int i=0; i<H; i++){
    //     for(int j=0; j<W; j++){
    //         cout << C[i][j] << " ";
    //     }
    //     cout << endl;
    // }
    for(int i=0; i<H; i++){
        for(int j=0; j<W; j++){
            if(B[i][j] != C[i][j]){
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout << "Yes" << endl;
    return 0;

}


Measured memory_bytes: 256