object Main extends App {
  val scanner = new java.util.Scanner(System.in)

  val a = scanner.nextInt()
  val b = scanner.nextInt()
  val s = scanner.next()

  if(1 <= a && b <= 5 &&
    s.length == a + b + 1 &&
    s.zipWithIndex.forall {
      case (c, index) =>
        if(index == a)
          c == '-'
        else
          ('0' to '9').contains(c)
    })
    println("Yes")
  else
    println("No")
}
