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();
		sc.close();
		if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		}
	}
} 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();
		sc.close();
		if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		}
	}
} 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();
		sc.close();
		if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		sc.close();
		if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		}
	} 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 sc.close() sc.close sc if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		} S.charAt(A) != '-' S.charAt(A) S.charAt S A '-' {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		} for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			} int i = 0; int i = 0; i 0 i < A + B + 1 i A + B + 1 A + B + 1 A B 1 i++ i++ i {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			} {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			} if(i == A) continue; i == A i A continue; if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				} S.charAt(i) >= '0' && S.charAt(i) <= '9' S.charAt(i) >= '0' S.charAt(i) S.charAt S i '0' S.charAt(i) <= '9' S.charAt(i) S.charAt S i '9' {
					continue;
				} continue; {
					System.out.println("No");
					System.exit(0);
				} System.out.println("No") System.out.println System.out System System.out "No" System.exit(0) System.exit System 0 System.out.println("Yes") System.out.println System.out System System.out "Yes" 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();
		sc.close();
		if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		}
	}
} 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();
		sc.close();
		if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		}
	}
} 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();
		sc.close();
		if(S.charAt(A) != '-') {
			System.out.println("No");
		}else {
			for(int i = 0; i < A + B + 1; i++) {
				if(i == A) continue;
				if(S.charAt(i) >= '0' && S.charAt(i) <= '9') {
					continue;
				}else {
					System.out.println("No");
					System.exit(0);
				}
			}
			System.out.println("Yes");
		}
	}
}