import 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();
		char[] s = sc.next().toCharArray();
		
		for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		if (s[a] != '-') {
			System.out.println("No");
			return;
		}
		for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		
		for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		if (s[a] != '-') {
			System.out.println("No");
			return;
		}
		for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		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();
		char[] s = sc.next().toCharArray();
		
		for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		if (s[a] != '-') {
			System.out.println("No");
			return;
		}
		for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		char[] s = sc.next().toCharArray();
		
		for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		if (s[a] != '-') {
			System.out.println("No");
			return;
		}
		for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		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 char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		} {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		} if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			} !(s[i] - '0' >= 0 && s[i] - '0' <= 9) (s[i] - '0' >= 0 && s[i] - '0' <= 9) s[i] - '0' >= 0 s[i] - '0' s[i] s i '0' 0 s[i] - '0' <= 9 s[i] - '0' s[i] s i '0' 9 {
				System.out.println("No");
				return;
			} System.out.println("No") System.out.println System.out System System.out "No" return; if (s[a] != '-') {
			System.out.println("No");
			return;
		} s[a] != '-' s[a] s a '-' {
			System.out.println("No");
			return;
		} System.out.println("No") System.out.println System.out System System.out "No" return; for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		} int i = a + 1; int i = a + 1; i a + 1 a 1 i < a + b i a + b a b i++ i++ i {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		} {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		} if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			} !(s[i] - '0' >= 0 && s[i] - '0' <= 9) (s[i] - '0' >= 0 && s[i] - '0' <= 9) s[i] - '0' >= 0 s[i] - '0' s[i] s i '0' 0 s[i] - '0' <= 9 s[i] - '0' s[i] s i '0' 9 {
				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" 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();
		char[] s = sc.next().toCharArray();
		
		for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		if (s[a] != '-') {
			System.out.println("No");
			return;
		}
		for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		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();
		char[] s = sc.next().toCharArray();
		
		for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		if (s[a] != '-') {
			System.out.println("No");
			return;
		}
		for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
} Main
import 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();
		char[] s = sc.next().toCharArray();
		
		for (int i = 0; i < a; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		if (s[a] != '-') {
			System.out.println("No");
			return;
		}
		for (int i = a + 1; i < a + b; i++) {
			if (!(s[i] - '0' >= 0 && s[i] - '0' <= 9)) {
				System.out.println("No");
				return;
			}
		}
		System.out.println("Yes");
	}
}
