import Data.Char

solve :: Int -> Int -> String -> Bool
solve a b s =
  (all isDigit $ take a s ++ drop (a+1) s)
  && s!!a == '-'
  && length s == a+b+1

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