
object Main extends App {
  
  val sc = new java.util.Scanner(System.in) 
  val a, b = sc.nextInt()
  val s = sc.next()
  if (!s.contains("-") || s.length != a + b + 1 || s.filter(x => x == '-').length != 1) {
    println("No")
  } else {
    val list = s.split("-")
    if (list(0).length == a && list(1).length == b) {
      println("Yes")
    } else {
      println("No")
    }
  }  
}
