import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int A = reader.nextInt();
		int B = reader.nextInt();
		String str = reader.next();
		String ans = "Yes";
		for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		if (str.charAt(A) != '-') {
			ans = "No";
		}
		for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		System.out.print(ans);
		reader.close();
	}
}


 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int A = reader.nextInt();
		int B = reader.nextInt();
		String str = reader.next();
		String ans = "Yes";
		for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		if (str.charAt(A) != '-') {
			ans = "No";
		}
		for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		System.out.print(ans);
		reader.close();
	}
} Main public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int A = reader.nextInt();
		int B = reader.nextInt();
		String str = reader.next();
		String ans = "Yes";
		for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		if (str.charAt(A) != '-') {
			ans = "No";
		}
		for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		System.out.print(ans);
		reader.close();
	} main {
		Scanner reader = new Scanner(System.in);
		int A = reader.nextInt();
		int B = reader.nextInt();
		String str = reader.next();
		String ans = "Yes";
		for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		if (str.charAt(A) != '-') {
			ans = "No";
		}
		for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		System.out.print(ans);
		reader.close();
	} Scanner reader = new Scanner(System.in); reader new Scanner(System.in) int A = reader.nextInt(); A reader.nextInt() reader.nextInt reader int B = reader.nextInt(); B reader.nextInt() reader.nextInt reader String str = reader.next(); str reader.next() reader.next reader String ans = "Yes"; ans "Yes" for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		} int i = 0; int i = 0; i 0 i < A i A i++ i++ i {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		} {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		} char ch = str.charAt(i); ch str.charAt(i) str.charAt str i if (!Character.isDigit(ch)) {
				ans = "No";
			} !Character.isDigit(ch) Character.isDigit(ch) Character.isDigit Character ch {
				ans = "No";
			} ans = "No" ans "No" if (str.charAt(A) != '-') {
			ans = "No";
		} str.charAt(A) != '-' str.charAt(A) str.charAt str A '-' {
			ans = "No";
		} ans = "No" ans "No" for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		} int i = A+1; int i = A+1; i A+1 A 1 i <= B + A i B + A B A i++ i++ i {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		} {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		} char ch = str.charAt(i); ch str.charAt(i) str.charAt str i if (!Character.isDigit(ch)) {
				ans = "No";
			} !Character.isDigit(ch) Character.isDigit(ch) Character.isDigit Character ch {
				ans = "No";
			} ans = "No" ans "No" System.out.print(ans) System.out.print System.out System System.out ans reader.close() reader.close reader String[] args args public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int A = reader.nextInt();
		int B = reader.nextInt();
		String str = reader.next();
		String ans = "Yes";
		for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		if (str.charAt(A) != '-') {
			ans = "No";
		}
		for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		System.out.print(ans);
		reader.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int A = reader.nextInt();
		int B = reader.nextInt();
		String str = reader.next();
		String ans = "Yes";
		for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		if (str.charAt(A) != '-') {
			ans = "No";
		}
		for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		System.out.print(ans);
		reader.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int A = reader.nextInt();
		int B = reader.nextInt();
		String str = reader.next();
		String ans = "Yes";
		for (int i = 0; i < A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		if (str.charAt(A) != '-') {
			ans = "No";
		}
		for (int i = A+1; i <= B + A; i++) {
			char ch = str.charAt(i);
			if (!Character.isDigit(ch)) {
				ans = "No";
			}
		}
		System.out.print(ans);
		reader.close();
	}
}



