import           Control.Monad
import           Data.List
import           Data.Ord
import           Data.List.Split
import qualified Data.Vector.Unboxed as V

main :: IO ()
main = do
  [a, b] <- map read . words <$> getLine
  s <- getLine
  let sa = take a s
      sb = s !! a
      sc = drop (a + 1) s
  if (length s == (a + b + 1))
      && all (`elem` ['0' .. '9']) sa
      && all (`elem` ['0' .. '9']) sc
      && sb == '-'
    then putStrLn "Yes"
    else putStrLn "No"