import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String input = br.readLine();
		String[] tmpArray = input.split(" ");
		int a = Integer.parseInt(tmpArray[0]);
		int b = Integer.parseInt(tmpArray[1]);
		
		String posStr = br.readLine();
		
		String ptnStr = "\\d{"+a+"}-\\d{"+b+"}";
		
		if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
//		String[] postal = posStr.split("-", -1);
////		Pattern p = Pattern.compile("[\\d]++");
////		Matcher m = p.matcher(arg0)
//		boolean available = false;
//		if(posStr.charAt(a) != '-'){
//			available = false;
//		}
//		else if(postal.length != 2){
//			available = false;
//		}
//		
////		else if(!postal[1].equals("-")){
////			available = false;
////		}
//		else if(postal[0].length() == a && Pattern.matches("\\d++", postal[0])
//			&& postal[1].length() == b && Pattern.matches("\\d++", postal[1])){
//			available = true;
//		}
//		
//		if(available){
//			System.out.println("Yes");
//		}
//		else {
//			System.out.println("No");
//		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.regex.Matcher; Matcher java.util.regex import java.util.regex.Pattern; Pattern java.util.regex public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String input = br.readLine();
		String[] tmpArray = input.split(" ");
		int a = Integer.parseInt(tmpArray[0]);
		int b = Integer.parseInt(tmpArray[1]);
		
		String posStr = br.readLine();
		
		String ptnStr = "\\d{"+a+"}-\\d{"+b+"}";
		
		if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
//		String[] postal = posStr.split("-", -1);
////		Pattern p = Pattern.compile("[\\d]++");
////		Matcher m = p.matcher(arg0)
//		boolean available = false;
//		if(posStr.charAt(a) != '-'){
//			available = false;
//		}
//		else if(postal.length != 2){
//			available = false;
//		}
//		
////		else if(!postal[1].equals("-")){
////			available = false;
////		}
//		else if(postal[0].length() == a && Pattern.matches("\\d++", postal[0])
//			&& postal[1].length() == b && Pattern.matches("\\d++", postal[1])){
//			available = true;
//		}
//		
//		if(available){
//			System.out.println("Yes");
//		}
//		else {
//			System.out.println("No");
//		}
	}

} Main /**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String input = br.readLine();
		String[] tmpArray = input.split(" ");
		int a = Integer.parseInt(tmpArray[0]);
		int b = Integer.parseInt(tmpArray[1]);
		
		String posStr = br.readLine();
		
		String ptnStr = "\\d{"+a+"}-\\d{"+b+"}";
		
		if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
//		String[] postal = posStr.split("-", -1);
////		Pattern p = Pattern.compile("[\\d]++");
////		Matcher m = p.matcher(arg0)
//		boolean available = false;
//		if(posStr.charAt(a) != '-'){
//			available = false;
//		}
//		else if(postal.length != 2){
//			available = false;
//		}
//		
////		else if(!postal[1].equals("-")){
////			available = false;
////		}
//		else if(postal[0].length() == a && Pattern.matches("\\d++", postal[0])
//			&& postal[1].length() == b && Pattern.matches("\\d++", postal[1])){
//			available = true;
//		}
//		
//		if(available){
//			System.out.println("Yes");
//		}
//		else {
//			System.out.println("No");
//		}
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String input = br.readLine();
		String[] tmpArray = input.split(" ");
		int a = Integer.parseInt(tmpArray[0]);
		int b = Integer.parseInt(tmpArray[1]);
		
		String posStr = br.readLine();
		
		String ptnStr = "\\d{"+a+"}-\\d{"+b+"}";
		
		if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
//		String[] postal = posStr.split("-", -1);
////		Pattern p = Pattern.compile("[\\d]++");
////		Matcher m = p.matcher(arg0)
//		boolean available = false;
//		if(posStr.charAt(a) != '-'){
//			available = false;
//		}
//		else if(postal.length != 2){
//			available = false;
//		}
//		
////		else if(!postal[1].equals("-")){
////			available = false;
////		}
//		else if(postal[0].length() == a && Pattern.matches("\\d++", postal[0])
//			&& postal[1].length() == b && Pattern.matches("\\d++", postal[1])){
//			available = true;
//		}
//		
//		if(available){
//			System.out.println("Yes");
//		}
//		else {
//			System.out.println("No");
//		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String input = br.readLine(); input br.readLine() br.readLine br String[] tmpArray = input.split(" "); tmpArray input.split(" ") input.split input " " int a = Integer.parseInt(tmpArray[0]); a Integer.parseInt(tmpArray[0]) Integer.parseInt Integer tmpArray[0] tmpArray 0 int b = Integer.parseInt(tmpArray[1]); b Integer.parseInt(tmpArray[1]) Integer.parseInt Integer tmpArray[1] tmpArray 1 String posStr = br.readLine(); posStr br.readLine() br.readLine br String ptnStr = "\\d{"+a+"}-\\d{"+b+"}"; ptnStr "\\d{"+a+"}-\\d{"+b+"}" b "}-\\d{" "\\d{"+a+"}-\\d{"+b+"}" "\\d{" a "}-\\d{" b "}" if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		} Pattern.matches(ptnStr, posStr) Pattern.matches Pattern ptnStr posStr {
			System.out.println("Yes");
		} System.out.println("Yes") System.out.println System.out System System.out "Yes" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String input = br.readLine();
		String[] tmpArray = input.split(" ");
		int a = Integer.parseInt(tmpArray[0]);
		int b = Integer.parseInt(tmpArray[1]);
		
		String posStr = br.readLine();
		
		String ptnStr = "\\d{"+a+"}-\\d{"+b+"}";
		
		if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
//		String[] postal = posStr.split("-", -1);
////		Pattern p = Pattern.compile("[\\d]++");
////		Matcher m = p.matcher(arg0)
//		boolean available = false;
//		if(posStr.charAt(a) != '-'){
//			available = false;
//		}
//		else if(postal.length != 2){
//			available = false;
//		}
//		
////		else if(!postal[1].equals("-")){
////			available = false;
////		}
//		else if(postal[0].length() == a && Pattern.matches("\\d++", postal[0])
//			&& postal[1].length() == b && Pattern.matches("\\d++", postal[1])){
//			available = true;
//		}
//		
//		if(available){
//			System.out.println("Yes");
//		}
//		else {
//			System.out.println("No");
//		}
	}

} public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String input = br.readLine();
		String[] tmpArray = input.split(" ");
		int a = Integer.parseInt(tmpArray[0]);
		int b = Integer.parseInt(tmpArray[1]);
		
		String posStr = br.readLine();
		
		String ptnStr = "\\d{"+a+"}-\\d{"+b+"}";
		
		if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
//		String[] postal = posStr.split("-", -1);
////		Pattern p = Pattern.compile("[\\d]++");
////		Matcher m = p.matcher(arg0)
//		boolean available = false;
//		if(posStr.charAt(a) != '-'){
//			available = false;
//		}
//		else if(postal.length != 2){
//			available = false;
//		}
//		
////		else if(!postal[1].equals("-")){
////			available = false;
////		}
//		else if(postal[0].length() == a && Pattern.matches("\\d++", postal[0])
//			&& postal[1].length() == b && Pattern.matches("\\d++", postal[1])){
//			available = true;
//		}
//		
//		if(available){
//			System.out.println("Yes");
//		}
//		else {
//			System.out.println("No");
//		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;


public class Main {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String input = br.readLine();
		String[] tmpArray = input.split(" ");
		int a = Integer.parseInt(tmpArray[0]);
		int b = Integer.parseInt(tmpArray[1]);
		
		String posStr = br.readLine();
		
		String ptnStr = "\\d{"+a+"}-\\d{"+b+"}";
		
		if(Pattern.matches(ptnStr, posStr)){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
//		String[] postal = posStr.split("-", -1);
////		Pattern p = Pattern.compile("[\\d]++");
////		Matcher m = p.matcher(arg0)
//		boolean available = false;
//		if(posStr.charAt(a) != '-'){
//			available = false;
//		}
//		else if(postal.length != 2){
//			available = false;
//		}
//		
////		else if(!postal[1].equals("-")){
////			available = false;
////		}
//		else if(postal[0].length() == a && Pattern.matches("\\d++", postal[0])
//			&& postal[1].length() == b && Pattern.matches("\\d++", postal[1])){
//			available = true;
//		}
//		
//		if(available){
//			System.out.println("Yes");
//		}
//		else {
//			System.out.println("No");
//		}
	}

}
