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();
		char[] S =sc.next().toCharArray();
		boolean flg = true;
		for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		}
		for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		}
		if  (S[A]!='-') flg = false;
		if (S.length != (A+B+1)) flg = false;
		if (flg) System.out.println("Yes");
		else System.out.println("No");
	}
} 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();
		char[] S =sc.next().toCharArray();
		boolean flg = true;
		for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		}
		for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		}
		if  (S[A]!='-') flg = false;
		if (S.length != (A+B+1)) flg = false;
		if (flg) System.out.println("Yes");
		else System.out.println("No");
	}
} 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();
		boolean flg = true;
		for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		}
		for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		}
		if  (S[A]!='-') flg = false;
		if (S.length != (A+B+1)) flg = false;
		if (flg) System.out.println("Yes");
		else System.out.println("No");
	} main {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		char[] S =sc.next().toCharArray();
		boolean flg = true;
		for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		}
		for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		}
		if  (S[A]!='-') flg = false;
		if (S.length != (A+B+1)) flg = false;
		if (flg) 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 char[] S =sc.next().toCharArray(); S sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc boolean flg = true; flg true for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		} int i=0; int i=0; i 0 i<A i A i++ i++ i {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		} {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		} if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			} !(S[i]<='9' && S[i]>='0') (S[i]<='9' && S[i]>='0') S[i]<='9' S[i] S i '9' S[i]>='0' S[i] S i '0' {
				flg = false;
				break;
			} flg = false flg false break; for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		} int i=1; int i=1; i 1 i<=B i B i++ i++ i {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		} {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		} if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			} !(S[A+i]<='9' && S[A+i]>='0') (S[A+i]<='9' && S[A+i]>='0') S[A+i]<='9' S[A+i] S A+i A i '9' S[A+i]>='0' S[A+i] S A+i A i '0' {
				flg = false;
				break;
			} flg = false flg false break; if  (S[A]!='-') flg = false; S[A]!='-' S[A] S A '-' flg = false flg false if (S.length != (A+B+1)) flg = false; S.length != (A+B+1) S.length S S.length (A+B+1) A+B+1 A B 1 flg = false flg false if (flg) System.out.println("Yes");
		else System.out.println("No"); flg System.out.println("Yes") System.out.println System.out System System.out "Yes" 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) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		char[] S =sc.next().toCharArray();
		boolean flg = true;
		for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		}
		for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		}
		if  (S[A]!='-') flg = false;
		if (S.length != (A+B+1)) flg = false;
		if (flg) System.out.println("Yes");
		else System.out.println("No");
	}
} 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();
		boolean flg = true;
		for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		}
		for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		}
		if  (S[A]!='-') flg = false;
		if (S.length != (A+B+1)) flg = false;
		if (flg) System.out.println("Yes");
		else System.out.println("No");
	}
} 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();
		char[] S =sc.next().toCharArray();
		boolean flg = true;
		for (int i=0; i<A; i++) {
			if ( !(S[i]<='9' && S[i]>='0') ) {
				flg = false;
				break;
			}
		}
		for (int i=1; i<=B; i++) {
			if ( !(S[A+i]<='9' && S[A+i]>='0') ) {
				flg = false;
				break;
			}
		}
		if  (S[A]!='-') flg = false;
		if (S.length != (A+B+1)) flg = false;
		if (flg) System.out.println("Yes");
		else System.out.println("No");
	}
}
