import java.util.*;
//import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long a = parseLong(sc.next());
		long b = parseLong(sc.next());
		char[] s = sc.next().toCharArray();
		sc.close();
		boolean f=true;
		for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		}
		if(f && s[i] != '-') {
			f=false;
		}
		if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} import java.util.*; util.* java import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Long.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long a = parseLong(sc.next());
		long b = parseLong(sc.next());
		char[] s = sc.next().toCharArray();
		sc.close();
		boolean f=true;
		for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		}
		if(f && s[i] != '-') {
			f=false;
		}
		if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} Main public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long a = parseLong(sc.next());
		long b = parseLong(sc.next());
		char[] s = sc.next().toCharArray();
		sc.close();
		boolean f=true;
		for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		}
		if(f && s[i] != '-') {
			f=false;
		}
		if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	} main {
		int i,j;
		Scanner sc = new Scanner(in);
		long a = parseLong(sc.next());
		long b = parseLong(sc.next());
		char[] s = sc.next().toCharArray();
		sc.close();
		boolean f=true;
		for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		}
		if(f && s[i] != '-') {
			f=false;
		}
		if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	} int i i j; j Scanner sc = new Scanner(in); sc new Scanner(in) long a = parseLong(sc.next()); a parseLong(sc.next()) parseLong sc.next() sc.next sc long b = parseLong(sc.next()); b parseLong(sc.next()) parseLong sc.next() sc.next sc char[] s = sc.next().toCharArray(); s sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc sc.close() sc.close sc boolean f=true; f true for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		} i = 0; i = 0 i 0 i < a i a i++ i++ i {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		} {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		} if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			} s[i] < '0' || '9' < s[i] s[i] < '0' s[i] s i '0' '9' < s[i] '9' s[i] s i {
				f=false;
				break;
			} f=false f false break; if(f && s[i] != '-') {
			f=false;
		} f && s[i] != '-' f s[i] != '-' s[i] s i '-' {
			f=false;
		} f=false f false if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		} f {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		} i++ i for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			} ; i < a+b+1 i a+b+1 a+b+1 a b 1 i++ i++ i {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			} {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			} if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				} s[i] < '0' || '9' < s[i] s[i] < '0' s[i] s i '0' '9' < s[i] '9' s[i] s i {
					f=false;
					break;
				} f=false f false break; out.println(f?"Yes":"No") out.println out f?"Yes":"No" f "Yes" "No" String[] args args public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long a = parseLong(sc.next());
		long b = parseLong(sc.next());
		char[] s = sc.next().toCharArray();
		sc.close();
		boolean f=true;
		for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		}
		if(f && s[i] != '-') {
			f=false;
		}
		if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long a = parseLong(sc.next());
		long b = parseLong(sc.next());
		char[] s = sc.next().toCharArray();
		sc.close();
		boolean f=true;
		for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		}
		if(f && s[i] != '-') {
			f=false;
		}
		if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
} Main
import java.util.*;
//import static java.lang.Integer.*;
import static java.lang.Long.*;
import static java.lang.Math.*;
import static java.lang.System.*;

public class Main {
	public static void main(String[] args) {
		int i,j;
		Scanner sc = new Scanner(in);
		long a = parseLong(sc.next());
		long b = parseLong(sc.next());
		char[] s = sc.next().toCharArray();
		sc.close();
		boolean f=true;
		for (i = 0; i < a; i++) {
			if(s[i] < '0' || '9' < s[i]) {
				f=false;
				break;
			}
		}
		if(f && s[i] != '-') {
			f=false;
		}
		if(f) {
			i++;
			for (; i < a+b+1; i++) {
				if(s[i] < '0' || '9' < s[i]) {
					f=false;
					break;
				}
			}
		}
		out.println(f?"Yes":"No");
	}
}
