program B_solution

implicit none
integer :: a,b,i,j
character(11) :: s

read(*,*) a,b
read(*,*) s

if(index(s(1:),'-') == a+1 .and. index(s(a+2:),'-') == 0) then
  write(*,*) "Yes"
else
  write(*,*) "No"
endif

end program