import Data.List
import qualified Data.ByteString.Char8 as B
import Data.Char

main :: IO ()
main = breads >>= main'
    where
        main' [a, b] = getLine >>= putStrLn . solve a b 

solve :: Int -> Int -> String -> String
solve a b s
    | y == '-' && all isDigit xs && all isDigit ys = "Yes"
    | otherwise = "No"
    where
        (xs, y : ys) = splitAt a s

breads :: IO [Int]
breads = unfoldr uff <$> B.getLine
    where
        uff b = check <$> B.readInt b
        check (a, b)
            | B.null b = (a, b)
            | otherwise = (a, B.tail b)