program main
   implicit none
   integer A, B, i, countN
   character(11) S
   read(*, *) A, B
   read(*, *) S
   countN = 0
   do i = 1, A+B+1
       if(S(i:i) == '-') then
           countN = countN + 1
       end if
   end do
   if(countN == 1 .and. S(A+1:A+1) == '-') then
       write(*, *) 'YES'
   else
       write(*, *) 'NO'
   end if
end program main