program sample
    implicit none
    character(1),allocatable::s(:,:)
    character(100)::t
    integer(8) :: i,j,m,n,h,w,a,b,c
    integer(8),allocatable :: x(:,:),y(:)
    read(*,*)h,w
    allocate(s(0:h+1,0:w+1))
    s(:, :)='0'
    do i=1,h
        read(*,*) t
        do j=1,w
            s(i,j)=t(j:j)
        enddo
    end do
    do i=1,h
        do j=1,w
            if(s(i,j) .eq. '#')then
                if(s(i+1,j) .eq. '#')then
                    cycle
                else if(s(i-1,j) .eq. '#')then
                    cycle
                else if(s(i,j-1) .eq. '#')then
                    cycle   
                else if(s(i,j+1) .eq. '#')then
                    cycle
                else
                    write(*,*)'No'
                    stop
                end if
            end if
        end do
    end do
    write(*,*)'Yes'

   
  
    stop
end program sample
  


  

