import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int A = Integer.parseInt(tokens[0]);
		int B = Integer.parseInt(tokens[1]);

		String S = in.readLine();
		Set<Character> numbers = new HashSet<>();
		for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		}
		
		boolean valid = isValid(S, numbers, A);
		String str = valid? "Yes": "No";
		System.out.println(str);

	}

	static boolean isValid(String S, Set<Character> numbers, int A) {
		for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	}
} import java.util.*; util.* java import java.io.*; io.* java import java.nio.charset.StandardCharsets; StandardCharsets java.nio.charset public class Main {

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int A = Integer.parseInt(tokens[0]);
		int B = Integer.parseInt(tokens[1]);

		String S = in.readLine();
		Set<Character> numbers = new HashSet<>();
		for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		}
		
		boolean valid = isValid(S, numbers, A);
		String str = valid? "Yes": "No";
		System.out.println(str);

	}

	static boolean isValid(String S, Set<Character> numbers, int A) {
		for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	}
} Main public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int A = Integer.parseInt(tokens[0]);
		int B = Integer.parseInt(tokens[1]);

		String S = in.readLine();
		Set<Character> numbers = new HashSet<>();
		for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		}
		
		boolean valid = isValid(S, numbers, A);
		String str = valid? "Yes": "No";
		System.out.println(str);

	} main {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int A = Integer.parseInt(tokens[0]);
		int B = Integer.parseInt(tokens[1]);

		String S = in.readLine();
		Set<Character> numbers = new HashSet<>();
		for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		}
		
		boolean valid = isValid(S, numbers, A);
		String str = valid? "Yes": "No";
		System.out.println(str);

	} InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8); reader new InputStreamReader(System.in, StandardCharsets.UTF_8) BufferedReader in = new BufferedReader(reader); in new BufferedReader(reader) String[] tokens = in.readLine().split(" "); tokens in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int A = Integer.parseInt(tokens[0]); A Integer.parseInt(tokens[0]) Integer.parseInt Integer tokens[0] tokens 0 int B = Integer.parseInt(tokens[1]); B Integer.parseInt(tokens[1]) Integer.parseInt Integer tokens[1] tokens 1 String S = in.readLine(); S in.readLine() in.readLine in Set<Character> numbers = new HashSet<>(); numbers new HashSet<>() for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		} int i = 0; int i = 0; i 0 i < 10 i 10 ++i ++i i {
			numbers.add(Integer.toString(i).charAt(0));
		} {
			numbers.add(Integer.toString(i).charAt(0));
		} numbers.add(Integer.toString(i).charAt(0)) numbers.add numbers Integer.toString(i).charAt(0) Integer.toString(i).charAt Integer.toString(i) Integer.toString Integer i 0 boolean valid = isValid(S, numbers, A); valid isValid(S, numbers, A) isValid S numbers A String str = valid? "Yes": "No"; str valid? "Yes": "No" valid "Yes" "No" System.out.println(str) System.out.println System.out System System.out str String[] args args static boolean isValid(String S, Set<Character> numbers, int A) {
		for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	} isValid {
		for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	} for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		} int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S ++i ++i i {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		} {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		} if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			} i == A i A {
				if(S.charAt(i) != '-') {
					return false;
				}
			} if(S.charAt(i) != '-') {
					return false;
				} S.charAt(i) != '-' S.charAt(i) S.charAt S i '-' {
					return false;
				} return false; false {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			} if(!numbers.contains(S.charAt(i))) {
					return false;
				} !numbers.contains(S.charAt(i)) numbers.contains(S.charAt(i)) numbers.contains numbers S.charAt(i) S.charAt S i {
					return false;
				} return false; false return true; true String S S Set<Character> numbers numbers int A A public class Main {

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int A = Integer.parseInt(tokens[0]);
		int B = Integer.parseInt(tokens[1]);

		String S = in.readLine();
		Set<Character> numbers = new HashSet<>();
		for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		}
		
		boolean valid = isValid(S, numbers, A);
		String str = valid? "Yes": "No";
		System.out.println(str);

	}

	static boolean isValid(String S, Set<Character> numbers, int A) {
		for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int A = Integer.parseInt(tokens[0]);
		int B = Integer.parseInt(tokens[1]);

		String S = in.readLine();
		Set<Character> numbers = new HashSet<>();
		for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		}
		
		boolean valid = isValid(S, numbers, A);
		String str = valid? "Yes": "No";
		System.out.println(str);

	}

	static boolean isValid(String S, Set<Character> numbers, int A) {
		for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	}
} Main
import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;

public class Main {

	public static void main(String[] args) throws IOException {
		InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
		BufferedReader in = new BufferedReader(reader);
		String[] tokens = in.readLine().split(" ");
		int A = Integer.parseInt(tokens[0]);
		int B = Integer.parseInt(tokens[1]);

		String S = in.readLine();
		Set<Character> numbers = new HashSet<>();
		for (int i = 0; i < 10; ++i) {
			numbers.add(Integer.toString(i).charAt(0));
		}
		
		boolean valid = isValid(S, numbers, A);
		String str = valid? "Yes": "No";
		System.out.println(str);

	}

	static boolean isValid(String S, Set<Character> numbers, int A) {
		for(int i = 0; i < S.length(); ++i) {
			if(i == A) {
				if(S.charAt(i) != '-') {
					return false;
				}
			}else {
				if(!numbers.contains(S.charAt(i))) {
					return false;
				}
			}
		}
		return true;
	}
}
