import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		boolean result = true;

		for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		}
		if (result){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		boolean result = true;

		for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		}
		if (result){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main public static void main(String[] args) throws NumberFormatException, IOException {

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		boolean result = true;

		for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		}
		if (result){
			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 result = true;

		for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		}
		if (result){
			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 result = true; result true for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		} int i=0; int i=0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		} {
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		} char c = S.charAt(i); c S.charAt(i) S.charAt S i if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			} i+1 <= A || i+1 >= A+2 i+1 <= A i+1 i 1 A i+1 >= A+2 i+1 i 1 A+2 A 2 {
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} if (c < '0' || c > '9'){
					result = false;
					break;
				} c < '0' || c > '9' c < '0' c '0' c > '9' c '9' {
					result = false;
					break;
				} result = false result false break; {
				if (c != '-'){
					result = false;
					break;
				}
			} if (c != '-'){
					result = false;
					break;
				} c != '-' c '-' {
					result = false;
					break;
				} result = false result false break; if (result){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		} result {
			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 public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		boolean result = true;

		for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		}
		if (result){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		boolean result = true;

		for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		}
		if (result){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) throws NumberFormatException, IOException {

		Scanner sc = new Scanner(System.in);

		int A = sc.nextInt();
		int B = sc.nextInt();
		String S = sc.next();
		boolean result = true;

		for (int i=0; i < S.length(); i++){
			char c = S.charAt(i);
			if (i+1 <= A || i+1 >= A+2){
				if (c < '0' || c > '9'){
					result = false;
					break;
				}
			} else {
				if (c != '-'){
					result = false;
					break;
				}
			}
		}
		if (result){
			System.out.println("Yes");
		} else {
			System.out.println("No");
		}
	}
}
