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 a + 1)
    val aft = s.substring(a + 1 until s.length)

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

    println(answer)
}
