import java.util.*

fun main(args: Array<String>) {
    val scanner = Scanner(System.`in`)
    val A = scanner.nextLong()
    val B = scanner.nextLong()
    val S = scanner.next()
    val regex = Regex("[0-9]{$A}-[0-9]{$B}")
    println(if (regex.matches(S)) "Yes" else "No")
}