module Main where

import Control.Applicative
import Control.Monad
import Data.List
import Data.Char

main :: IO ()
main = do
    [a, b] <- fmap read . words <$> getLine :: IO [Int]
    ss <- getLine
    let c1 = take a ss
    let c2 = head $ drop a ss
    let c3 = take b $ drop (a + 1) ss
    if and [ all isAlphaNum c1
           , c2 == '-'
           , all isAlphaNum c3
           ]
        then putStrLn "Yes"
        else putStrLn "No"