import Data.Bool
import Data.Char

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

solve a b s = and $
  [ all isDigit $ take a s
  , (s !! (a + 1)) == '-'
  , all isDigit $ drop (a + 1) s
  ]
  
  