fun main(args: Array<String>) {
    abc084b()
}

fun abc084b() {
    val (a, b) = readLine()!!.split(" ").map { it.toInt() }
    val s = readLine()!!

    val pre = s.substring(0 until a)
    val mid = s.substring(a until b)
    val aft = s.substring(b until s.length)

    val answer = if (pre.all { it in '0'..'9' } && mid == "-" && aft.all { it in '0'..'9' }) {
        "Yes"
    } else {
        "No"
    }

    println(answer)
}
