import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt(), b = scanner.nextInt();
		String s = scanner.next();
		if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		}
		String left = s.substring(0, a);
		String right = s.substring(a+1, a+b+1);
		String regex = "[0-9]*";
		if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt(), b = scanner.nextInt();
		String s = scanner.next();
		if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		}
		String left = s.substring(0, a);
		String right = s.substring(a+1, a+b+1);
		String regex = "[0-9]*";
		if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}

} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt(), b = scanner.nextInt();
		String s = scanner.next();
		if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		}
		String left = s.substring(0, a);
		String right = s.substring(a+1, a+b+1);
		String regex = "[0-9]*";
		if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt(), b = scanner.nextInt();
		String s = scanner.next();
		if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		}
		String left = s.substring(0, a);
		String right = s.substring(a+1, a+b+1);
		String regex = "[0-9]*";
		if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int a = scanner.nextInt() a scanner.nextInt() scanner.nextInt scanner b = scanner.nextInt(); b scanner.nextInt() scanner.nextInt scanner String s = scanner.next(); s scanner.next() scanner.next scanner if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		} s.charAt(a) != '-' || s.length() != (a + b + 1) s.charAt(a) != '-' s.charAt(a) s.charAt s a '-' s.length() != (a + b + 1) s.length() s.length s (a + b + 1) a + b + 1 a b 1 {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; String left = s.substring(0, a); left s.substring(0, a) s.substring s 0 a String right = s.substring(a+1, a+b+1); right s.substring(a+1, a+b+1) s.substring s a+1 a 1 a+b+1 a+b+1 a b 1 String regex = "[0-9]*"; regex "[0-9]*" if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		} left.matches(regex) && right.matches(regex) left.matches(regex) left.matches left regex right.matches(regex) right.matches right regex {
			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 {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt(), b = scanner.nextInt();
		String s = scanner.next();
		if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		}
		String left = s.substring(0, a);
		String right = s.substring(a+1, a+b+1);
		String regex = "[0-9]*";
		if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt(), b = scanner.nextInt();
		String s = scanner.next();
		if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		}
		String left = s.substring(0, a);
		String right = s.substring(a+1, a+b+1);
		String regex = "[0-9]*";
		if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int a = scanner.nextInt(), b = scanner.nextInt();
		String s = scanner.next();
		if(s.charAt(a) != '-' || s.length() != (a + b + 1)){
			System.out.println("No");
			return;
		}
		String left = s.substring(0, a);
		String right = s.substring(a+1, a+b+1);
		String regex = "[0-9]*";
		if(left.matches(regex) && right.matches(regex)){
			System.out.println("Yes");
		}else{
			System.out.println("No");
		}
	}

}
