import java.util.*;

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();
	boolean flagA = false;
	boolean flagB = false;
	boolean flagX = false;
	for(int i = 0; i < a; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	}
	if(s.charAt(a) == '-') {
		flagX = true;
	}
	for(int i = a + 1; i < a + b + 1; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	}
	if(flagA == true && flagX == true && flagB == true) {
		System.out.println("Yes");
	} else {
		System.out.println("No");
	}
}
} import java.util.*; util.* java 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();
	boolean flagA = false;
	boolean flagB = false;
	boolean flagX = false;
	for(int i = 0; i < a; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	}
	if(s.charAt(a) == '-') {
		flagX = true;
	}
	for(int i = a + 1; i < a + b + 1; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	}
	if(flagA == true && flagX == true && flagB == true) {
		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();
	boolean flagA = false;
	boolean flagB = false;
	boolean flagX = false;
	for(int i = 0; i < a; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	}
	if(s.charAt(a) == '-') {
		flagX = true;
	}
	for(int i = a + 1; i < a + b + 1; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	}
	if(flagA == true && flagX == true && flagB == true) {
		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();
	boolean flagA = false;
	boolean flagB = false;
	boolean flagX = false;
	for(int i = 0; i < a; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	}
	if(s.charAt(a) == '-') {
		flagX = true;
	}
	for(int i = a + 1; i < a + b + 1; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	}
	if(flagA == true && flagX == true && flagB == true) {
		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 boolean flagA = false; flagA false boolean flagB = false; flagB false boolean flagX = false; flagX false for(int i = 0; i < a; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	} {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	} for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		} int j = 0; int j = 0; j 0 j <= 9 j 9 j++ j++ j {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		} {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		} if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			} Character.getNumericValue(s.charAt(i)) == j Character.getNumericValue(s.charAt(i)) Character.getNumericValue Character s.charAt(i) s.charAt s i j {
				flagA = true;
				break;
			} flagA = true flagA true break; {
				flagA = false;
			} flagA = false flagA false if(s.charAt(a) == '-') {
		flagX = true;
	} s.charAt(a) == '-' s.charAt(a) s.charAt s a '-' {
		flagX = true;
	} flagX = true flagX true for(int i = a + 1; i < a + b + 1; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	} 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 {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	} {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	} for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		} int j = 0; int j = 0; j 0 j <= 9 j 9 j++ j++ j {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		} {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		} if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			} Character.getNumericValue(s.charAt(i)) == j Character.getNumericValue(s.charAt(i)) Character.getNumericValue Character s.charAt(i) s.charAt s i j {
				flagB = true;
				break;
			} flagB = true flagB true break; {
				flagB = false;
			} flagB = false flagB false if(flagA == true && flagX == true && flagB == true) {
		System.out.println("Yes");
	} else {
		System.out.println("No");
	} flagA == true && flagX == true && flagB == true flagA == true && flagX == true && flagB == true flagA == true flagA true flagX == true flagX true flagB == true flagB true {
		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
import java.util.*;

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();
	boolean flagA = false;
	boolean flagB = false;
	boolean flagX = false;
	for(int i = 0; i < a; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagA = true;
				break;
			} else {
				flagA = false;
			}
		}
	}
	if(s.charAt(a) == '-') {
		flagX = true;
	}
	for(int i = a + 1; i < a + b + 1; i++) {
		for(int j = 0; j <= 9; j++) {
			if(Character.getNumericValue(s.charAt(i)) == j) {
				flagB = true;
				break;
			} else {
				flagB = false;
			}
		}
	}
	if(flagA == true && flagX == true && flagB == true) {
		System.out.println("Yes");
	} else {
		System.out.println("No");
	}
}
}