import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  [a,b] <- map (read::String->Int) . words <$> getLine
  s<-getLine
  let left = take a s; hyphen = s!!a; right = (take b .reverse) s
  putStrLn $ if checkZIP left hyphen right then "Yes" else "No"

checkZIP x y z = and [checknum x, checkhyphen y, checknum z]
checknum x = and $ elemList x ['0'..'9']
checkhyphen x = x=='-'
elemList [] _ = []
elemList (x:xs) list  = elem x list : elemList xs list