fun main(args: Array<String>) {
    val (a, b) = readLine()!!.split(" ").map(String::toInt)
    val s = readLine()!!
    if (isValid(a, b, s)) {
        println("Yes")
    } else {
        println("No")
    }
}

fun isValid(a: Int, b: Int, s: String): Boolean {
    for ((i, c) in s.withIndex()) {
        if (i == a) {
            if (c != '-') return false
        } else {
            if (!('0'..'9').contains(c)) return false
        }
    }
    return true
}