import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val a = sc.nextInt()
  val b = sc.nextInt()
  val s = sc.next()

  var ans = true
  if (s.length != a + b + 1) ans = false

  for (i in 0 until a) {
    if ('0' <= s.get(i) && s.get(i) <= '9') {
    } else {
      ans = false 
    }
  }
  if (s.get(a) != '-') ans = false
  for (i in a + 1 until a + b + 1) {
    if ('0' <= s.get(i) && s.get(i) <= '9') {
    } else {
      ans = false
    }
  }

  var str = "No"
  if (ans) str = "Yes"

  println(str)
}
