fun main(args: Array<String>) {
    val (a, b) = readLine()!!.split(" ").map { it.toInt() }
    val s = readLine()!!

    println(if (s.isPostalCode(a, b)) "Yes" else "No")
}

fun String.isPostalCode(pre: Int, post: Int): Boolean =
        this[pre] == '-' &&
                this.subSequence(0, pre).all { it in '0'..'9' } &&
                this.subSequence(pre + 1, this.length).all { it in '0'..'9' }
