fun main(args: Array<String>) {
    val inputNum = readLine()?.split(" ").orEmpty()
    val numA = inputNum[0].toInt()
    val numB = inputNum[1].toInt()

    val postal = readLine().orEmpty()
    val reg = "\\d{$numA}-\\d{$numB}"
    val checkR = Regex(reg)
    val a = checkR.matchEntire(postal)?.value
    var result = "Yes"

    if(a.isNullOrBlank()){
        result = "No"
    }
    println(result)
}