package main

import "fmt"

func main() {
	var A, B int
	var S string
	fmt.Scan(&A, &B)
	fmt.Scan(&S)

	a := S[0:A]
	d := S[A : A+1]
	b := S[A+1 : A+1+B]

	if a+d+b == S {
		fmt.Println("Yes")
	} else {
		fmt.Println("No")
	}
}
