{-# LANGUAGE Strict #-}
import           Data.Char (isDigit)

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

solve :: Int -> Int -> String -> Bool
solve a _ s = all isDigit xs && y == '-' && all isDigit ys
  where (xs, y:ys) = splitAt a s
