main :: IO ()
main = do
  [a, b] <- map read . words <$> getLine
  (s1, s2) <- break (=='-') <$> getLine
  if (not . null) s2 && po s1 && (po . tail) s2 && length s1 == a && length s2 == b + 1
    then putStrLn "Yes"
    else putStrLn "No"

po :: String -> Bool
po = notElem '-'
