object Main extends App {
    val Array(a,b) = io.StdIn.readLine.split(" ").map(_.toInt)
    val s = io.StdIn.readLine

    if (s.matches(s"[0-9]{$a}-[0-9]{$b}")) println("Yes")
    else println("No")
}