program prob2
    implicit none
    integer::A, B, i
    character(len=15)::S
    read(*,*) A, B
    read(*,*) S
    do i = 1, A+B+1
        if(i == A+1) then
            if(S(i:i) .ne. "-") then
                write(*,'(a)') "No"
                stop
            end if
        else if(ichar(S(i:i)) < ichar('0') .or. ichar(S(i:i)) > ichar('9')) then
            write(*,'(a)') "No"
            stop
        end if
    end do
    write(*,'(a)') "Yes"
    stop
end program