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();

		String ans;
		if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		}
		System.out.println(ans);
		sc.close();
	}

} 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();

		String ans;
		if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		}
		System.out.println(ans);
		sc.close();
	}

} 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();

		String ans;
		if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		}
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();

		String ans;
		if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		}
		System.out.println(ans);
		sc.close();
	} 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 String ans; ans if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		} s.length() == a + b + 1 s.length() s.length s a + b + 1 a + b + 1 a b 1 {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} ans = "Yes" ans "Yes" for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			} {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			} if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				} i == a i a {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} if (s.charAt(i) != '-') {
						ans = "No";
						break;
					} s.charAt(i) != '-' s.charAt(i) s.charAt s i '-' {
						ans = "No";
						break;
					} ans = "No" ans "No" break; {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				} if (s.charAt(i) == '-') {
						ans = "No";
						break;
					} s.charAt(i) == '-' s.charAt(i) s.charAt s i '-' {
						ans = "No";
						break;
					} ans = "No" ans "No" break; {
			ans = "No";
		} ans = "No" ans "No" System.out.println(ans) System.out.println System.out System System.out ans sc.close() sc.close sc 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();

		String ans;
		if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		}
		System.out.println(ans);
		sc.close();
	}

} 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();

		String ans;
		if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		}
		System.out.println(ans);
		sc.close();
	}

} 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();

		String ans;
		if (s.length() == a + b + 1) {
			ans = "Yes";
			for (int i = 0; i < s.length(); i++) {
				if (i == a) {
					if (s.charAt(i) != '-') {
						ans = "No";
						break;
					}
				} else {
					if (s.charAt(i) == '-') {
						ans = "No";
						break;
					}
				}
			}
		} else {
			ans = "No";
		}
		System.out.println(ans);
		sc.close();
	}

}
