import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		int length = s.length();
		if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		}
		

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		int length = s.length();
		if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		}
		

		
	
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		int length = s.length();
		if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		}
		

		
	
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		int length = s.length();
		if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		}
		

		
	
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc String s = sc.next(); s sc.next() sc.next sc int length = s.length(); length s.length() s.length s if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		} a>=1 && a<=5 && b>=1 && b<= 5 b>=1 a>=1 && a<=5 && b>=1 && b<= 5 a>=1 a 1 a<=5 a 5 b>=1 b 1 b<= 5 b 5 {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		} if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			} (a+b+1) != length (a+b+1) a+b+1 a b 1 length {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			} char c = s.charAt(a); c s.charAt(a) s.charAt s a if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				} c != '-' c '-' {
					System.out.println("No");
					return;
				} System.out.println("No") System.out.println System.out System System.out "No" return; {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				} String[] str = s.split("-"); str s.split("-") s.split s "-" if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					} str.length==2 str.length str str.length 2 {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					} String A = str[0]; A str[0] str 0 String B = str[1]; B str[1] str 1 for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						} int i=0; int i=0; i 0 i<a i a i++ i++ i {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						} {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						} char t = A.charAt(i); t A.charAt(i) A.charAt A i int tmp = Integer.valueOf(t); tmp Integer.valueOf(t) Integer.valueOf Integer t if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							} tmp<48 || tmp>57 tmp<48 tmp 48 tmp>57 tmp 57 {
								System.out.println("No");
								return;
							} System.out.println("No") System.out.println System.out System System.out "No" return; for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						} int i=0; int i=0; i 0 i<b i b i++ i++ i {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						} {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						} char t = B.charAt(i); t B.charAt(i) B.charAt B i int tmp = Integer.valueOf(t); tmp Integer.valueOf(t) Integer.valueOf Integer t if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							} tmp<48 || tmp>57 tmp<48 tmp 48 tmp>57 tmp 57 {
								System.out.println("No");
								return;
							} System.out.println("No") System.out.println System.out System System.out "No" return; System.out.println("Yes") System.out.println System.out System System.out "Yes" return; {
						System.out.println("No");
						return;
					} System.out.println("No") System.out.println System.out System System.out "No" return; String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		int length = s.length();
		if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		}
		

		
	
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		int length = s.length();
		if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		}
		

		
	
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		int length = s.length();
		if(a>=1 && a<=5 && b>=1 && b<= 5) {
			if((a+b+1) != length) {
				System.out.println("No");
				return;
			}else {
				char c = s.charAt(a);
				if(c != '-') {
					System.out.println("No");
					return;
				}else {
					
					String[] str = s.split("-");
					if(str.length==2) {
						String A = str[0];
						String B = str[1];
						for(int i=0; i<a; i++) {
							char t = A.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						for(int i=0; i<b; i++) {
							char t = B.charAt(i);
							int tmp = Integer.valueOf(t);
							if(tmp<48 || tmp>57) {
								System.out.println("No");
								return;
							}
						}
						System.out.println("Yes");
						return;
					}else {
						System.out.println("No");
						return;
					}
				}
			}
		}
		

		
	
	}
}
