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 countA = 0;
		int countB = 0;
		int count_ = 0;
		
		for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		}
		for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		}
		if(S.charAt(A) == '-') {
			count_++;
		}
		if(countA == A && countB == B && count_ == 1) {
			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 sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		
		int countA = 0;
		int countB = 0;
		int count_ = 0;
		
		for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		}
		for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		}
		if(S.charAt(A) == '-') {
			count_++;
		}
		if(countA == A && countB == B && count_ == 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
	}
} 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 countA = 0;
		int countB = 0;
		int count_ = 0;
		
		for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		}
		for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		}
		if(S.charAt(A) == '-') {
			count_++;
		}
		if(countA == A && countB == B && count_ == 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		
		int countA = 0;
		int countB = 0;
		int count_ = 0;
		
		for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		}
		for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		}
		if(S.charAt(A) == '-') {
			count_++;
		}
		if(countA == A && countB == B && count_ == 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
	} 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 countA = 0; countA 0 int countB = 0; countB 0 int count_ = 0; count_ 0 for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		} int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		} {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		} if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			} S.substring(i, i + 1).matches("[0-9]") S.substring(i, i + 1).matches S.substring(i, i + 1) S.substring S i i + 1 i 1 "[0-9]" {
				countA++;
			} countA++ countA for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		} int i = A + 1; int i = A + 1; i A + 1 A 1 i < A + B + 1 i A + B + 1 A + B + 1 A B 1 i++ i++ i {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		} {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		} if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			} S.substring(i, i + 1).matches("[0-9]") S.substring(i, i + 1).matches S.substring(i, i + 1) S.substring S i i + 1 i 1 "[0-9]" {
				countB++;
			} countB++ countB if(S.charAt(A) == '-') {
			count_++;
		} S.charAt(A) == '-' S.charAt(A) S.charAt S A '-' {
			count_++;
		} count_++ count_ if(countA == A && countB == B && count_ == 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} countA == A && countB == B && count_ == 1 countA == A && countB == B && count_ == 1 countA == A countA A countB == B countB B count_ == 1 count_ 1 {
			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 sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		
		int countA = 0;
		int countB = 0;
		int count_ = 0;
		
		for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		}
		for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		}
		if(S.charAt(A) == '-') {
			count_++;
		}
		if(countA == A && countB == B && count_ == 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
	}
} 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 countA = 0;
		int countB = 0;
		int count_ = 0;
		
		for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		}
		for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		}
		if(S.charAt(A) == '-') {
			count_++;
		}
		if(countA == A && countB == B && count_ == 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
	}
} 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 countA = 0;
		int countB = 0;
		int count_ = 0;
		
		for(int i = 0; i < A; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countA++;
			}
		}
		for(int i = A + 1; i < A + B + 1; i++) {
			if(S.substring(i, i + 1).matches("[0-9]")) {
				countB++;
			}
		}
		if(S.charAt(A) == '-') {
			count_++;
		}
		if(countA == A && countB == B && count_ == 1) {
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
		
	}
}
