package main

import (
	"fmt"
	"strings"
)

func main() {
	var A, B int
	var S string
	fmt.Scan(&A, &B)
	fmt.Scan(&S)
	ok := true
	if len(S) == A+B+1 {
		i := strings.Index(S, "-")
		if i > 0 {
			s := []string{S[0:i], S[i+1:]}
			// fmt.Println("dbg", s)
		LOOP:
			for _, ts := range s {
				for _, v := range ts {
					if v < '0' || '9' < v {
						ok = false
						break LOOP
					}
				}
			}
		} else {
			ok = false
		}
	} else {
		ok = false
	}
	if ok {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}

}
