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();
		char[] cs = s.toCharArray();
		int cnt = 0;

		if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}

		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();
		char[] cs = s.toCharArray();
		int cnt = 0;

		if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}

		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();
		char[] cs = s.toCharArray();
		int cnt = 0;

		if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		String s = sc.next();
		char[] cs = s.toCharArray();
		int cnt = 0;

		if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}

		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 char[] cs = s.toCharArray(); cs s.toCharArray() s.toCharArray s int cnt = 0; cnt 0 if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		} String.valueOf(cs[a]).equals("-") String.valueOf(cs[a]).equals String.valueOf(cs[a]) String.valueOf String cs[a] cs a "-" {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			} {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			} if (Character.isDigit(cs[i])) {
					cnt++;
				} Character.isDigit(cs[i]) Character.isDigit Character cs[i] cs i {
					cnt++;
				} cnt++ cnt for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			} 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 (Character.isDigit(cs[i])) {
					cnt++;
				}
			} {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			} if (Character.isDigit(cs[i])) {
					cnt++;
				} Character.isDigit(cs[i]) Character.isDigit Character cs[i] cs i {
					cnt++;
				} cnt++ cnt if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			} cnt == (a + b) cnt (a + b) a b {
				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" {
			System.out.println("No");
		} System.out.println("No") System.out.println System.out System System.out "No" 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();
		char[] cs = s.toCharArray();
		int cnt = 0;

		if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}

		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();
		char[] cs = s.toCharArray();
		int cnt = 0;

		if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}

		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();
		char[] cs = s.toCharArray();
		int cnt = 0;

		if (String.valueOf(cs[a]).equals("-")) {
			for (int i = 0; i < a; i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			for (int i = (a + 1); i <= (a + b); i++) {
				if (Character.isDigit(cs[i])) {
					cnt++;
				}
			}
			if (cnt == (a + b)) {
				System.out.println("Yes");
			} else {
				System.out.println("No");
			}
		} else {
			System.out.println("No");
		}

		sc.close();
	}

}