
object Main extends App {
  
  val sc = new java.util.Scanner(System.in) 
  val a, b = sc.nextInt()
  val s = sc.next()
  val pattern = s"\\d{$a}-\\d{$b}".r
  if (pattern.matches(s)) {
    println("Yes")
  } else {
    println("No")
  }
}
