import Data.Char

main = do
  [a, b] <- map read . words <$> getLine
  s <- getLine
  if solve a b s
    then putStrLn "Yes"
    else putStrLn "No"


solve a b s = all isDigit (take a s) && all isDigit (drop (a + 1) s) && s !! a == '-'
