"use strict";

function main(input) {
    input = input.split(/\n|\s/)
    const a = ~~input[0]
    const b = ~~input[1]
    const s = input[2].split('-')

    let ans = 'No'
    if (s[0].length == a && s[1].length === b && s[0].match(/^[0-9]+$/) && s[1].match(/^[0-9]+$/)) {
        ans = 'Yes'
    }
    console.log(ans)

main(require("fs").readFileSync("/dev/stdin", "utf8"));
